From 73e6db85423d240b5f319ee08844207bec5c534e Mon Sep 17 00:00:00 2001 From: Kenneth Sheridan Date: Tue, 5 Nov 2024 21:00:23 -0800 Subject: [PATCH] fix: correct filesystem information collection * Fix get_filesystems function: - Add missing vector initialization - Replace println! with vector collection - Properly return collected filesystem information - Maintain consistent formatting This fixes the function to properly collect and return filesystem information instead of just printing it. The function now correctly fulfills its return type of Result, Box>. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 46b6ed0..d9ff0b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1245,7 +1245,7 @@ fn main() -> Result<(), Box> { // Get filesystem information println!("\nFilesystems:"); let output = Command::new("df") - .args(&["-h", "--output=source,fstype,size,used,avail,target"]) + .args(["-h", "--output=source,fstype,size,used,avail,target"]) .output()?; let fs_str = String::from_utf8(output.stdout)?; for line in fs_str.lines().skip(1) {