Use other to string in CLI app
This commit is contained in:
@@ -3,6 +3,7 @@ use std::time::Duration;
|
||||
use clap::{Arg, Command};
|
||||
use hyper_x_cloud_ii_wireless::devices::{cloud_ii_wireless_dts::CloudIIWirelessDTS, Device};
|
||||
|
||||
//TODO: error handling e.g. reconnect on "no such device" error
|
||||
fn main() {
|
||||
let matches = Command::new(env!("CARGO_PKG_NAME"))
|
||||
.version(env!("CARGO_PKG_VERSION"))
|
||||
@@ -114,7 +115,10 @@ fn main() {
|
||||
eprintln!("{error}");
|
||||
std::process::exit(1);
|
||||
};
|
||||
println!("Device State: {}", device.get_device_state());
|
||||
println!(
|
||||
"Device State: \n{}",
|
||||
device.get_device_state().to_better_string()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user