diff --git a/README.md b/README.md index d35c299..d991ae2 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ All errors are structured with numeric codes. No user-facing English text — ap ## Contributing -Run `freemkv info --share` with the [freemkv CLI](https://github.com/freemkv/freemkv) to contribute your drive's profile. +Run `freemkv drive-info --share` with the [freemkv CLI](https://github.com/freemkv/freemkv) to contribute your drive's profile. ## License diff --git a/src/profile.rs b/src/profile.rs index aa9523c..319e3f3 100644 --- a/src/profile.rs +++ b/src/profile.rs @@ -65,12 +65,12 @@ pub struct ProfileMatch { fn parse_hex4(s: &str) -> Result<[u8; 4]> { if s.len() != 8 { - return Err(Error::ProfileParse { detail: format!("expected 8 hex chars, got {}", s.len()) }); + return Err(Error::ProfileParse); } let mut out = [0u8; 4]; for i in 0..4 { out[i] = u8::from_str_radix(&s[i*2..i*2+2], 16) - .map_err(|e| Error::ProfileParse { detail: format!("bad hex: {e}") })?; + .map_err(|_| Error::ProfileParse)?; } Ok(out) } @@ -102,7 +102,7 @@ pub fn load_bundled() -> Result { fn load_from_str(data: &str) -> Result { serde_json::from_str(data) - .map_err(|e| Error::ProfileParse { detail: format!("JSON: {e}") }) + .map_err(|_| Error::ProfileParse) } /// Find a profile matching a drive's INQUIRY fields.