From ea5e74025223e6ddc328fcfdc02db689c71b71bb Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Sat, 4 Jun 2022 22:24:56 +0300 Subject: [PATCH] fix warning in the example project --- Cargo.toml | 6 +++--- fang_examples/simple_worker/src/main.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7528ff9..43bc7e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,8 +16,8 @@ diesel-derive-enum = { version = "1", features = ["postgres"] } dotenv = "0.15" uuid = { version = "0.8", features = ["v4"] } chrono = "0.4" -serde_json = "1.0" +serde_json = "1" typetag = "0.1" log = "0.4" -serde = { version = "1.0", features = ["derive"] } -thiserror = "1.0.29" +serde = { version = "1", features = ["derive"] } +thiserror = "1.0" diff --git a/fang_examples/simple_worker/src/main.rs b/fang_examples/simple_worker/src/main.rs index 8a84982..ae66e39 100644 --- a/fang_examples/simple_worker/src/main.rs +++ b/fang_examples/simple_worker/src/main.rs @@ -3,8 +3,8 @@ use fang::Queue; use fang::RetentionMode; use fang::WorkerParams; use fang::WorkerPool; -use simple_worker::MyJob; use signal_hook::{consts::signal::*, iterator::Signals}; +use simple_worker::MyJob; fn main() { dotenv().ok(); @@ -29,13 +29,13 @@ fn main() { println!("Received SIGINT"); worker_pool.shutdown().unwrap(); break; - }, + } SIGTERM => { println!("Received SIGTERM"); worker_pool.shutdown().unwrap(); break; - }, - _ => unreachable!(format!("Received unexpected signal: {:?}", sig)), + } + _ => unreachable!("Received unexpected signal: {:?}", sig), } } }