From 0970381271bd07f020a888b027653ca627e8655c Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 27 Oct 2019 10:55:30 +0000 Subject: Implement Default for all backend structs This fixes the clippy warning new_without_default [0]. [0] https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default --- src/backends/kdialog.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backends/kdialog.rs') diff --git a/src/backends/kdialog.rs b/src/backends/kdialog.rs index 34070c4..c2ddcd0 100644 --- a/src/backends/kdialog.rs +++ b/src/backends/kdialog.rs @@ -20,7 +20,7 @@ const CANCEL: i32 = 1; /// The `kdialog` backend. /// /// This backend uses the external `kdialog` program to display KDE dialog boxes. -#[derive(Debug)] +#[derive(Debug, Default)] pub struct KDialog { icon: Option, // TODO: --dontagain @@ -29,7 +29,7 @@ pub struct KDialog { impl KDialog { /// Creates a new `KDialog` instance without configuration. pub fn new() -> KDialog { - KDialog { icon: None } + Default::default() } /// Sets the icon in the dialog box's titlebar and taskbar button. -- cgit v1.2.1