Replace em dashes with hyphens across docs and comments

This commit is contained in:
2026-08-29 08:13:54 +00:00
parent 1583f531fa
commit a2d4e578ec
21 changed files with 104 additions and 104 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
//! fetch_bambu_cert combined: for each Bambu printer in printers.toml,
//! makes sure it has a working certificate, auto-pinning one via
//! trust-on-first-connect if the bundled CA doesn't verify. Safe to run
//! repeatedly a printer that's already pinned (certs/pinned/<serial
//! repeatedly - a printer that's already pinned (certs/pinned/<serial
//! number>.pem) just gets re-verified against its pin, no network trust
//! decision is made again.
+2 -2
View File
@@ -1,7 +1,7 @@
//! Run with: cargo run --example bambu_commands_demo
//!
//! Round-trips both commands against the exact JSON from Bambu's real
//! protocol proves the plain hand-written struct + serde approach
//! protocol - proves the plain hand-written struct + serde approach
//! matches byte for byte, same as the proto-based version did, with none
//! of the build.rs ceremony.
@@ -34,7 +34,7 @@ fn main() {
println!("matches Bambu's shape: {}\n", actual == expected);
// --- print report: arrives under "print", NOT "pushing" (pushall
// triggers this stream, it isn't a direct reply to it) includes the
// triggers this stream, it isn't a direct reply to it) - includes the
// full ams/xcam example, with one empty tray and one loaded tray, to
// exercise the untagged Empty/Loaded split.
let real_print_report = r#"{
+2 -2
View File
@@ -3,11 +3,11 @@
//! "Trust on first connect": connects to one printer from printers.toml
//! with certificate verification disabled, captures whatever certificate
//! it presents, and saves it as PEM. Meant for a printer like P1P that
//! doesn't chain to the bundled CA after running this, point that
//! doesn't chain to the bundled CA - after running this, point that
//! printer's `ca_cert_path` in printers.toml at the saved file and
//! `test_bambu_certs` should report it as verified from then on.
//!
//! This trusts whoever answers on the network *right now* only run it on
//! This trusts whoever answers on the network *right now* - only run it on
//! a network you trust, ideally right after unboxing the printer.
use continuum_proxy::fleet;
+5 -5
View File
@@ -4,7 +4,7 @@
//! - `connect()` is called the same way regardless of vendor (polymorphism),
//! but each variant's `impl GenericPrinter` runs completely different
//! code (override).
//! - `dispatch_gcode()` only exists on the two Bambu structs (extension)
//! - `dispatch_gcode()` only exists on the two Bambu structs (extension) -
//! you have to `match` the enum back down to the concrete type to reach
//! it, which is the trade-off for not having implicit downcasting.
@@ -35,7 +35,7 @@ async fn main() {
PrinterHandle::PrusaLink(PrusaLinkPrinter::new("p3", "MK4", "192.168.1.51", "prusa-api-key")),
PrinterHandle::PrusaSerial(PrusaSerialPrinter::new("p4", "MK3S+", 0)),
PrinterHandle::Klipper(KlipperPrinter::new("p5", "Voron 2.4", "192.168.1.52")),
// No host configured this one will hit the Err path.
// No host configured - this one will hit the Err path.
PrinterHandle::Klipper(KlipperPrinter::new("p6", "Broken Voron", "")),
];
@@ -52,7 +52,7 @@ async fn main() {
// Vendor-only extension: reachable only after matching the concrete
// variant back out of the enum. BambuV1Printer and BambuV2Printer are
// separate types now (each *has* a BambuGenericPrinter rather than
// being the same struct), so unlike before the split this needs
// being the same struct), so - unlike before the split - this needs
// two arms instead of one `A(x) | B(x)` pattern: an or-pattern requires
// every alternative to bind the same type, and these no longer do.
for printer in &fleet {
@@ -64,9 +64,9 @@ async fn main() {
}
// A second trait method, same uniform call site as connect(): every
// vendor sends "50%" a completely different way an MQTT gcode
// vendor sends "50%" a completely different way - an MQTT gcode
// command, Moonraker's native API, gcode over HTTP, gcode over serial
// but the caller doesn't need to know or care which.
// - but the caller doesn't need to know or care which.
println!();
for printer in &mut fleet {
let _ = printer.set_fan_speed(50).await;
+3 -3
View File
@@ -2,7 +2,7 @@
//!
//! Loads printers.toml (copy printers.example.toml to get started, fill in
//! your real printers) and attempts a raw TLS handshake to each Bambu
//! printer's MQTTS port (8883) no MQTT protocol involved, just "does the
//! printer's MQTTS port (8883) - no MQTT protocol involved, just "does the
//! certificate verify". Prusa/Klipper entries are skipped; they don't have
//! this trust question.
@@ -28,7 +28,7 @@ fn main() -> anyhow::Result<()> {
fn report(name: &str, result: anyhow::Result<()>) {
match result {
Ok(()) => println!("{name}: OK certificate verified"),
Err(err) => println!("{name}: FAILED {err}"),
Ok(()) => println!("{name}: OK - certificate verified"),
Err(err) => println!("{name}: FAILED - {err}"),
}
}