From 0bcaca47f31599ead4843c702a732dab7524353d Mon Sep 17 00:00:00 2001 From: Xorycode Date: Wed, 1 May 2024 00:39:04 +0300 Subject: [PATCH] fix: implement improved filter (first implemented on quickill) --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e97d6ba..d3e2fb7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ fn get_block_devices() -> Vec { 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(); }