Address new clippy warnings

This commit is contained in:
topjohnwu
2026-07-31 22:57:41 -07:00
committed by John Wu
parent b32ff20b79
commit bffc9108bc
2 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -1221,6 +1221,6 @@ mod argh_shared {
fn new_line(current_line: &mut String, out: &mut String) {
out.push('\n');
out.push_str(current_line);
current_line.truncate(0);
current_line.clear();
}
}
+2 -5
View File
@@ -140,11 +140,8 @@ pub fn find_preinit_device() -> String {
if !info.fs_option.split(',').any(|s| s == "rw") {
return None;
}
if let Some(path) = Path::new(&info.source).parent() {
if !path.ends_with("by-name") && !path.ends_with("block") {
return None;
}
} else {
let path = Path::new(&info.source).parent()?;
if !path.ends_with("by-name") && !path.ends_with("block") {
return None;
}
// use device major number to filter out device-mapper