added some creature comforts and cleaned logging

This commit is contained in:
Andrew Rioux
2023-12-05 15:16:20 -05:00
parent 0021794c51
commit 2f9746fa25
2 changed files with 3 additions and 13 deletions

View File

@@ -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<_>>();