src/tools/disks/smart.rs: use model.to_string_lossy() to simplify code
This commit is contained in:
parent
484e761dab
commit
4c24a48eb3
|
@ -202,13 +202,7 @@ fn lookup_vendor_wearout_id(disk: &super::Disk) -> u64 {
|
||||||
|
|
||||||
let result = 233; // default
|
let result = 233; // default
|
||||||
let model = match disk.model() {
|
let model = match disk.model() {
|
||||||
Some(model) => {
|
Some(model) => model.to_string_lossy().to_lowercase(),
|
||||||
if let Some(model) = model.to_str() {
|
|
||||||
model.to_lowercase()
|
|
||||||
} else {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
None => return result,
|
None => return result,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue