src/tools/disks/smart.rs: use model.to_string_lossy() to simplify code

This commit is contained in:
Dietmar Maurer 2020-06-06 09:05:22 +02:00
parent 484e761dab
commit 4c24a48eb3
1 changed files with 1 additions and 7 deletions

View File

@ -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,
};