Skip to content

Commit ab896d7

Browse files
committed
examples: Formatting
1 parent e6a5e47 commit ab896d7

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

examples/repeat.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
extern crate msgflo;
2-
32
use msgflo::participant::{Participant, InfoBuilder, Info};
43

54
struct Repeat {
65
state: Option<String>, // we don't really have any state
76
}
8-
97
impl Participant for Repeat {
108
fn info(&self) -> Info {
11-
InfoBuilder::new("rust/Repeat")
12-
.label("Repeats input as-is")
9+
InfoBuilder::new("rust/Repeat").label("Repeats input as-is")
1310
.inport("in")
1411
.outport("out")
1512
.build()
1613
}
17-
14+
// Will be called with input AMQP data on 'in' port, and send to 'out'
1815
fn process(&self, input: Vec<u8>) -> Result<Vec<u8>, Vec<u8>> {
1916
println!("repeat process():");
2017
return Ok(input);
2118
}
22-
2319
}
24-
2520
fn main() {
2621
static r: Repeat = Repeat { state: None };
2722
msgflo::participant::main(&r);

0 commit comments

Comments
 (0)