added some creature comforts and cleaned logging
This commit is contained in:
@@ -138,7 +138,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
loop {
|
||||
let mut buffer = String::new();
|
||||
match selected_beacon {
|
||||
Some(ref bid) => print!("{} >", bid.0),
|
||||
Some(ref bid) => print!("{} > ", bid.0),
|
||||
None => print!("> "),
|
||||
};
|
||||
stdout.flush()?;
|
||||
@@ -156,15 +156,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
Some("select") => {
|
||||
let beacon = items.next();
|
||||
|
||||
match beacon {
|
||||
Some(bid) => {
|
||||
selected_beacon = Some(BeaconId(bid.to_owned()));
|
||||
}
|
||||
None => {
|
||||
eprintln!("No beacon ID selected")
|
||||
}
|
||||
}
|
||||
selected_beacon = beacon.map(ToOwned::to_owned).map(BeaconId);
|
||||
}
|
||||
Some("cmd") => {
|
||||
let parts = items.collect::<Vec<_>>();
|
||||
|
||||
Reference in New Issue
Block a user