From 9a4f3805dc900efc99104e41cdbb00e7376dbd48 Mon Sep 17 00:00:00 2001 From: Lennard Kittner Date: Sat, 22 Mar 2025 12:22:56 +0100 Subject: [PATCH] Use other to string in CLI app --- src/bin/cli_app.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/cli_app.rs b/src/bin/cli_app.rs index db9d6ae..cb3cc7f 100644 --- a/src/bin/cli_app.rs +++ b/src/bin/cli_app.rs @@ -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]