Open robsonsmartins opened 1 year ago
I think someone else raised a similar issue. I agree it should return a Result
I think someone else raised a similar issue. I agree it should return a Result instead. Would you like to make the change?
I submitted this pull request: #43
Thanks!
There is a bug in handling the return of
serde_json::from_str()
in the nvme.rs functions (get_error_log
,get_firmware_log
andget_smart_log
):let deserialized: String = serde_json::from_str(&stdout)?;
The serde_json::from_str() function returns a
Value
and not aString
.Perhaps the best thing is that the
get_error_log
,get_firmware_log
andget_smart_log
functions were rewritten to returnBlockResult<Value>
instead ofBlockResult<String>
, so the user could call, for example: