diff options
author | 2023-03-14 11:11:17 +0100 | |
---|---|---|
committer | 2023-03-14 11:11:17 +0100 | |
commit | 1816c985fad2ead8dc1e7b62dc8e4bafeed856b2 (patch) | |
tree | 09fc36e95e99939842cf14c79d4a08baf9a2da1f /examples/todos | |
parent | 8f14b448d263a2cfd03a998b1d54c21e33d58980 (diff) | |
download | iced-1816c985fad2ead8dc1e7b62dc8e4bafeed856b2.tar.gz iced-1816c985fad2ead8dc1e7b62dc8e4bafeed856b2.tar.bz2 iced-1816c985fad2ead8dc1e7b62dc8e4bafeed856b2.zip |
Fix `clippy` lints for Rust 1.68
Diffstat (limited to 'examples/todos')
-rw-r--r-- | examples/todos/src/main.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 6a87f58c..6361667e 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -435,19 +435,16 @@ fn view_controls(tasks: &[Task], current_filter: Filter) -> Element<Message> { .into() } -#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[derive( + Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize, +)] pub enum Filter { + #[default] All, Active, Completed, } -impl Default for Filter { - fn default() -> Self { - Filter::All - } -} - impl Filter { fn matches(&self, task: &Task) -> bool { match self { |