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 model = match disk.model() {
|
||||
Some(model) => {
|
||||
if let Some(model) = model.to_str() {
|
||||
model.to_lowercase()
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Some(model) => model.to_string_lossy().to_lowercase(),
|
||||
None => return result,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue