summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSerguey Parkhomovsky <xindigo@gmail.com>2026-03-17 20:41:59 -0700
committerSerguey Parkhomovsky <xindigo@gmail.com>2026-03-17 20:41:59 -0700
commitd0bb801b908ea2de76779206a462ac99fc87be29 (patch)
treeb4d6229dea280817ea10bcaa94ede845b124324f /src
parent409828278eba21c506abfac8c13851e1274ebc95 (diff)
Harmonize some more stuff
Diffstat (limited to 'src')
-rw-r--r--src/main.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 9710430..f6ec659 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -17,13 +17,14 @@ async fn main() {
for printer in config.printers {
match printer {
- Printer::Prusa { name, host, api_key, .. } => {
+ Printer::Prusa { name, host, api_key } => {
+ println!("Found Prusa: {} at {}", name, host);
let state_clone = state.clone();
tokio::spawn(poll_prusa(name, host, api_key, state_clone));
}
Printer::Bambu { name, host, serial_number, access_code } => {
println!("Found Bambu: {} at {}", name, host);
- let state_clone = Arc::clone(&state);
+ let state_clone = state.clone();
tokio::spawn(poll_bambu(name, host, serial_number, access_code, state_clone));
}
}
@@ -33,7 +34,7 @@ async fn main() {
let app = Router::new()
.route("/", get(root))
- .with_state(Arc::clone(&state));
+ .with_state(state.clone());
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
let _ = axum::serve(listener, app).await;