Closed robsonsmartins closed 1 year ago
Fixes issue #42.
Changed the return of functions get_error_log(), get_firmware_log() and get_smart_log() to serde_json::Value.
get_error_log()
get_firmware_log()
get_smart_log()
serde_json::Value
In addition to correcting the mismatched return type error (Map isn't a String), the user will be able to call something like this:
Map
String
let log = get_firmware_log(&device_path).expect("error getting log"); println!("temp: {:.2} ºC", log.get("temperature").and_then(Value::as_f64).unwrap_or_default() - 273.15);
Fixes issue #42.
Changed the return of functions
get_error_log()
,get_firmware_log()
andget_smart_log()
toserde_json::Value
.In addition to correcting the mismatched return type error (
Map
isn't aString
), the user will be able to call something like this: