From 364b47f0e6ad994c65a88827e689c70ccb9c3353 Mon Sep 17 00:00:00 2001 From: Kenneth Sheridan Date: Tue, 5 Nov 2024 20:55:22 -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 876fd66..46b6ed0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -570,7 +570,7 @@ impl ServerInfo { /// Gets filesystem information fn get_filesystems() -> Result, Box> { 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 output_str = String::from_utf8(output.stdout)?;