aboutsummaryrefslogtreecommitdiff
path: root/src/backends/kdialog.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-10-27 10:55:30 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-10-27 11:59:40 +0100
commit0970381271bd07f020a888b027653ca627e8655c (patch)
tree95f5f6f94b7851b98a78a91a851d5e3783bd5ac2 /src/backends/kdialog.rs
parentca06c4c4a2846b1c0410af1c7a68c65f5489a0b9 (diff)
downloaddialog-rs-0970381271bd07f020a888b027653ca627e8655c.tar.gz
dialog-rs-0970381271bd07f020a888b027653ca627e8655c.tar.bz2
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
Diffstat (limited to 'src/backends/kdialog.rs')
-rw-r--r--src/backends/kdialog.rs4
1 files changed, 2 insertions, 2 deletions
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<String>,
// 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.