diff --git a/getting-started/nodes/rust/file-writer/src/lib.rs b/getting-started/nodes/rust/file-writer/src/lib.rs index 78842e4..2dd4496 100644 --- a/getting-started/nodes/rust/file-writer/src/lib.rs +++ b/getting-started/nodes/rust/file-writer/src/lib.rs @@ -13,8 +13,8 @@ // use async_std::{fs::File, io::WriteExt, sync::Mutex}; -use zenoh_flow::{anyhow, prelude::*}; use prost::Message as pMessage; +use zenoh_flow::{anyhow, prelude::*}; #[export_sink] pub struct FileWriter { diff --git a/getting-started/nodes/rust/greetings-maker/src/lib.rs b/getting-started/nodes/rust/greetings-maker/src/lib.rs index 2ea66be..81b489c 100644 --- a/getting-started/nodes/rust/greetings-maker/src/lib.rs +++ b/getting-started/nodes/rust/greetings-maker/src/lib.rs @@ -12,8 +12,8 @@ // ZettaScale Zenoh Team, // -use zenoh_flow::{anyhow, prelude::*}; use prost::Message as pMessage; +use zenoh_flow::{anyhow, prelude::*}; #[export_operator] pub struct GreetingsMaker { @@ -37,9 +37,7 @@ impl Operator for GreetingsMaker { output: outputs .take("greeting") .expect("No output 'greeting' found") - .typed(|buffer, data: &String| { - data.encode(buffer).map_err(|e| anyhow!(e)) - }), + .typed(|buffer, data: &String| data.encode(buffer).map_err(|e| anyhow!(e))), }) } } diff --git a/period-miss-detector/nodes/rust/file-writer/src/lib.rs b/period-miss-detector/nodes/rust/file-writer/src/lib.rs index 80a379f..7c22cce 100644 --- a/period-miss-detector/nodes/rust/file-writer/src/lib.rs +++ b/period-miss-detector/nodes/rust/file-writer/src/lib.rs @@ -13,8 +13,8 @@ // use async_std::{fs::File, io::WriteExt, sync::Mutex}; -use zenoh_flow::{anyhow, prelude::*}; use prost::Message as pMessage; +use zenoh_flow::{anyhow, prelude::*}; #[export_sink] pub struct FileWriter { diff --git a/period-miss-detector/nodes/rust/period-miss-detector/src/lib.rs b/period-miss-detector/nodes/rust/period-miss-detector/src/lib.rs index d7561e5..436ac0e 100644 --- a/period-miss-detector/nodes/rust/period-miss-detector/src/lib.rs +++ b/period-miss-detector/nodes/rust/period-miss-detector/src/lib.rs @@ -14,9 +14,9 @@ use async_std::prelude::FutureExt; use async_std::sync::{Arc, Mutex}; +use prost::Message as pMessage; use std::time::{Duration, Instant}; use zenoh_flow::{anyhow, prelude::*}; -use prost::Message as pMessage; #[export_operator] pub struct PeriodMissDetector { @@ -43,9 +43,7 @@ impl Operator for PeriodMissDetector { output: outputs .take("out") .expect("No output 'out' found") - .typed(|buffer, data: &String| { - data.encode(buffer).map_err(|e| anyhow!(e)) - }), + .typed(|buffer, data: &String| data.encode(buffer).map_err(|e| anyhow!(e))), // CAVEAT: There can be a delay between the moment the node is created and the moment it // is actually run. next_period: Arc::new(Mutex::new(