diff --git a/rust-toolchain.toml b/rust-toolchain.toml index a95d1b8f..e3cec3f4 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.90" +channel = "1.91" components = ["clippy", "rustfmt" ] diff --git a/src/lists.rs b/src/lists.rs index 56332e25..693a9d8d 100644 --- a/src/lists.rs +++ b/src/lists.rs @@ -12,19 +12,14 @@ use serde::{Deserialize, Serialize}; use thiserror::Error; /// Specifies rule types to keep during parsing. -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, Default)] pub enum RuleTypes { + #[default] All, NetworkOnly, CosmeticOnly, } -impl Default for RuleTypes { - fn default() -> Self { - Self::All - } -} - impl RuleTypes { pub fn loads_network_rules(&self) -> bool { matches!(self, Self::All | Self::NetworkOnly)