From 74da003a8a487e8ce4d68b0e30423c69036fa44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xory=20=E2=80=8B?= Date: Thu, 18 Apr 2024 11:34:28 +0000 Subject: [PATCH] fix: att 1 --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 88fa359..e97d6ba 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('└')) + .filter(|line| !line.starts_with('|') && !line.starts_with('├') && !line.starts_with('└') && !line.starts_with('-')) .map(|line| line.to_string()) .collect(); } @@ -68,6 +68,6 @@ mod tests { #[test] fn test_disk_locator() { - assert_eq!(get_block_devices(), vec!["vda".to_string()]) // Don't worry! This is *supposed* to not pass CI/CD. It should only be tested on QEMU/KVM Virtual Machines. + assert_eq!(get_block_devices(), vec!["vda".to_string()] || vec!["sda".to_string()]) // Don't worry! This is *supposed* to not pass CI/CD. It should only be tested on QEMU/KVM Virtual Machines. } }