Skip to content

Commit 77dffe8

Browse files
author
Julien Loudet
committed
Run cargo fmt on period-miss-detector and getting-started
Signed-off-by: Julien Loudet <julien.loudet@zettascale.tech>
1 parent ee32730 commit 77dffe8

File tree

4 files changed

+6
-10
lines changed
  • getting-started/nodes/rust
  • period-miss-detector/nodes/rust

4 files changed

+6
-10
lines changed

getting-started/nodes/rust/file-writer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
//
1414

1515
use async_std::{fs::File, io::WriteExt, sync::Mutex};
16-
use zenoh_flow::{anyhow, prelude::*};
1716
use prost::Message as pMessage;
17+
use zenoh_flow::{anyhow, prelude::*};
1818

1919
#[export_sink]
2020
pub struct FileWriter {

getting-started/nodes/rust/greetings-maker/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// ZettaScale Zenoh Team, <zenoh@zettascale.tech>
1313
//
1414

15-
use zenoh_flow::{anyhow, prelude::*};
1615
use prost::Message as pMessage;
16+
use zenoh_flow::{anyhow, prelude::*};
1717

1818
#[export_operator]
1919
pub struct GreetingsMaker {
@@ -37,9 +37,7 @@ impl Operator for GreetingsMaker {
3737
output: outputs
3838
.take("greeting")
3939
.expect("No output 'greeting' found")
40-
.typed(|buffer, data: &String| {
41-
data.encode(buffer).map_err(|e| anyhow!(e))
42-
}),
40+
.typed(|buffer, data: &String| data.encode(buffer).map_err(|e| anyhow!(e))),
4341
})
4442
}
4543
}

period-miss-detector/nodes/rust/file-writer/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
//
1414

1515
use async_std::{fs::File, io::WriteExt, sync::Mutex};
16-
use zenoh_flow::{anyhow, prelude::*};
1716
use prost::Message as pMessage;
17+
use zenoh_flow::{anyhow, prelude::*};
1818

1919
#[export_sink]
2020
pub struct FileWriter {

period-miss-detector/nodes/rust/period-miss-detector/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
use async_std::prelude::FutureExt;
1616
use async_std::sync::{Arc, Mutex};
17+
use prost::Message as pMessage;
1718
use std::time::{Duration, Instant};
1819
use zenoh_flow::{anyhow, prelude::*};
19-
use prost::Message as pMessage;
2020

2121
#[export_operator]
2222
pub struct PeriodMissDetector {
@@ -43,9 +43,7 @@ impl Operator for PeriodMissDetector {
4343
output: outputs
4444
.take("out")
4545
.expect("No output 'out' found")
46-
.typed(|buffer, data: &String| {
47-
data.encode(buffer).map_err(|e| anyhow!(e))
48-
}),
46+
.typed(|buffer, data: &String| data.encode(buffer).map_err(|e| anyhow!(e))),
4947
// CAVEAT: There can be a delay between the moment the node is created and the moment it
5048
// is actually run.
5149
next_period: Arc::new(Mutex::new(

0 commit comments

Comments
 (0)