summaryrefslogtreecommitdiff
path: root/src/backends
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends')
-rw-r--r--src/backends/dialog.rs6
-rw-r--r--src/backends/zenity.rs6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/backends/dialog.rs b/src/backends/dialog.rs
index 939b8f3..6f078e6 100644
--- a/src/backends/dialog.rs
+++ b/src/backends/dialog.rs
@@ -77,6 +77,12 @@ impl Dialog {
}
}
+impl AsRef<Dialog> for Dialog {
+ fn as_ref(&self) -> &Self {
+ self
+ }
+}
+
fn require_success(status: process::ExitStatus) -> Result<()> {
if status.success() {
Ok(())
diff --git a/src/backends/zenity.rs b/src/backends/zenity.rs
index a90c3da..4bf862b 100644
--- a/src/backends/zenity.rs
+++ b/src/backends/zenity.rs
@@ -88,6 +88,12 @@ impl Zenity {
}
}
+impl AsRef<Zenity> for Zenity {
+ fn as_ref(&self) -> &Self {
+ self
+ }
+}
+
fn require_success(status: process::ExitStatus) -> Result<()> {
if status.success() {
Ok(())