summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.dev>2025-06-08 02:04:09 +0200
committerpml68 <contact@pml68.dev>2025-06-08 02:04:09 +0200
commitc1f50e1efa78ef7f35ed6f44828976fb7328d85b (patch)
treea33930e87597b02aafa22e8f209e114eaef79912 /src/error.rs
parentfix: animated theme change on startup when config theme != "Dark" (diff)
downloadiced-builder-c1f50e1efa78ef7f35ed6f44828976fb7328d85b.tar.gz
feat: dialog improvements
- "Unsaved changes" dialogs ask about saving the project - Trying to close the window also triggers an "unsaved changes" dialog when the editor is dirty. - Nicer API for dialogs (similar to what I do in `foghorn-rs/foghorn`)
Diffstat (limited to '')
-rw-r--r--src/error.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index 9e1ee9d..c8405f4 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,3 +1,4 @@
+use std::borrow::Cow;
use std::io;
use std::sync::Arc;
@@ -57,3 +58,9 @@ impl From<Error> for String {
value.to_string()
}
}
+
+impl From<Error> for Cow<'static, str> {
+ fn from(value: Error) -> Self {
+ value.to_string().into()
+ }
+}