From 4a62ae8fbee1dfb61f499edf537e0efd6a25464e Mon Sep 17 00:00:00 2001 From: "J. David Lowe" Date: Tue, 26 Nov 2024 10:28:42 -0800 Subject: [PATCH] don't special-case the default of DiskRefreshKind.kind --- src/common/disk.rs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/common/disk.rs b/src/common/disk.rs index 3bab585ce..0b89de6b1 100644 --- a/src/common/disk.rs +++ b/src/common/disk.rs @@ -438,31 +438,21 @@ impl fmt::Display for DiskKind { /// ```no_run /// use sysinfo::{Disks, DiskRefreshKind}; /// -/// let mut disks = Disks::new_with_refreshed_list_specifics(DiskRefreshKind::new()); +/// let mut disks = Disks::new_with_refreshed_list_specifics(DiskRefreshKind::everything()); /// /// for disk in disks.list() { /// assert_eq!(disk.total_space(), 0); /// } /// ``` -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Default)] pub struct DiskRefreshKind { kind: bool, details: bool, io_usage: bool, } -impl Default for DiskRefreshKind { - fn default() -> Self { - Self { - kind: true, - details: false, - io_usage: false, - } - } -} - impl DiskRefreshKind { - /// Creates a new `DiskRefreshKind` with every refresh *except kind* set to false. + /// Creates a new `DiskRefreshKind` with every refresh set to false. /// /// ``` /// use sysinfo::DiskRefreshKind;