Skip to content

Commit

Permalink
Run cargo fmt on period-miss-detector and getting-started
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Loudet <julien.loudet@zettascale.tech>
  • Loading branch information
J-Loudet committed Jul 17, 2023
1 parent ee32730 commit 77dffe8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion getting-started/nodes/rust/file-writer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 2 additions & 4 deletions getting-started/nodes/rust/greetings-maker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
//

use zenoh_flow::{anyhow, prelude::*};
use prost::Message as pMessage;
use zenoh_flow::{anyhow, prelude::*};

#[export_operator]
pub struct GreetingsMaker {
Expand All @@ -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))),
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion period-miss-detector/nodes/rust/file-writer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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(
Expand Down

0 comments on commit 77dffe8

Please sign in to comment.