Skip to content

Commit 67aa61a

Browse files
committed
cleanup
1 parent d768fd2 commit 67aa61a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/cc253x.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
//use pasts::Executor;
2+
use futures::executor::block_on;
23
use rusty_zigbee_dongle::{
34
cc253x::CC253X,
45
coordinator::{Coordinator, CoordinatorError, LedStatus},
56
};
67
use std::path::PathBuf;
7-
use futures::executor::block_on;
88

99
fn main() {
1010
let f = async {
1111
let cc2531 = CC253X::from_path(PathBuf::from("/dev/ttyACM0"), 115_200).unwrap();
1212

1313
// Not all firmware versions support LED write as far as I understood
1414
let a = async {
15+
1516
cc2531.set_led(LedStatus::On).await.unwrap();
1617
Ok::<(), CoordinatorError>(())
1718
};
1819
let b = async {
1920
println!("version: {:?}", cc2531.version().await);
2021
Ok::<(), CoordinatorError>(())
2122
};
22-
futures::try_join!(a,b)
23+
futures::try_join!(a, b)
2324
};
24-
25-
let v = block_on(f);
26-
println!("version: {:?}", v);
25+
26+
block_on(f).unwrap();
2727
}

src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ macro_rules! log {
66
println!($($arg)*);
77
}
88
}
9+
use futures::executor::block_on;
910
pub(crate) use log;
1011

1112
#[allow(unused_macros)]
@@ -17,7 +18,6 @@ macro_rules! warnn {
1718
#[allow(unused_imports)]
1819
pub(crate) use warnn;
1920

20-
2121
macro_rules! err {
2222
($($arg:tt)*) => {
2323
eprintln!($($arg)*);

0 commit comments

Comments
 (0)