valpackett / systemstat

Rust library for getting system information | also on https://codeberg.org/valpackett/systemstat
https://crates.io/crates/systemstat
The Unlicense
610 stars 71 forks source link

Update mod.rs #110

Closed KevinGage closed 1 year ago

KevinGage commented 1 year ago

remove outdated Windows mount_at implementation.

There is a generic mount_at implementation in common.rs that works fine for windows mounts once the old implementation is removed. Following example works after making this change.

match sys.mount_at("C:\\") {
        Ok(mount) => {
            println!("\nMount at C:\\");
            println!(
                "{} ---{}---> {} (available {} of {})",
                mount.fs_mounted_from, mount.fs_type, mount.fs_mounted_on, mount.avail, mount.total
            );
        }
        Err(x) => println!("\nMount at C:\\ error: {}", x),
    }
valpackett commented 1 year ago

Thanks!