fix: implement improved filter (first implemented on quickill)

This commit is contained in:
Xorycode 2024-05-01 00:39:04 +03:00
parent 907ac741a0
commit 0bcaca47f3

View file

@ -16,7 +16,7 @@ fn get_block_devices() -> Vec<String> {
if output.status.success() {
output_str = String::from_utf8(output.stdout).unwrap();
block_devices = output_str.lines()
.filter(|line| !line.starts_with('|') && !line.starts_with('├') && !line.starts_with('└') && !line.starts_with('-'))
.filter(|line| !line.trim().contains('|') && !line.trim().contains('│') && !line.trim().contains('├') && !line.trim().contains('└') && !line.trim().contains('-'))
.map(|line| line.to_string())
.collect();
}