aboutsummaryrefslogtreecommitdiff
path: root/src/backends/dialog.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/dialog.rs')
-rw-r--r--src/backends/dialog.rs16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/backends/dialog.rs b/src/backends/dialog.rs
index 85b0294..8061d98 100644
--- a/src/backends/dialog.rs
+++ b/src/backends/dialog.rs
@@ -19,11 +19,7 @@ pub struct Dialog {
impl Dialog {
/// Creates a new `Dialog` instance without configuration.
pub fn new() -> Dialog {
- Dialog {
- backtitle: None,
- height: "0".to_string(),
- width: "0".to_string(),
- }
+ Default::default()
}
/// Sets the backtitle for the dialog boxes.
@@ -87,6 +83,16 @@ impl AsRef<Dialog> for Dialog {
}
}
+impl Default for Dialog {
+ fn default() -> Self {
+ Dialog {
+ backtitle: None,
+ height: "0".to_string(),
+ width: "0".to_string(),
+ }
+ }
+}
+
fn require_success(status: process::ExitStatus) -> Result<()> {
if status.success() {
Ok(())