So i was trying to get a list of all units as in the doc's, but it doesn't work because returns a empty vector
fn test_status() { let units = systemctl::list_units(None, None); // all units let is_ok = units.is_ok(); println!("{}", is_ok); let new_units = units.unwrap(); println!("{}", new_units.len()); }
output
true 0
Test in the terminal
systemctl list-units | wc -l 199
I'm i doing something wrong or is something broken
So i was trying to get a list of all units as in the doc's, but it doesn't work because returns a empty vector
fn test_status() { let units = systemctl::list_units(None, None); // all units let is_ok = units.is_ok(); println!("{}", is_ok); let new_units = units.unwrap(); println!("{}", new_units.len()); }output
true 0Test in the terminal
systemctl list-units | wc -l 199I'm i doing something wrong or is something broken