about summary refs log tree commit diff
path: root/src/error.rs
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-11-25 01:00:00 -0700
committerIrene Knapp <ireneista@irenes.space>2026-11-25 01:00:00 -0700
commit893c15a2eeb16156c0b4f3e4ea815098b8f477be (patch)
tree2ddb46c4f3f7461d5dc792ee7c0270e204f4ef81 /src/error.rs
parentda6bc6bdbf50da0eeeb4b544395c1b392d228d21 (diff)
route i3 replies to the corresponding requestor
Force-Push: yes
Change-Id: Ibe6fb298c9399f1ce3eaaeffecbad13b164eafbf
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index a0aa68e..f7ef553 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -40,6 +40,19 @@ impl From<std::num::ParseIntError> for Error {
   }
 }
 
+impl From<std::str::Utf8Error> for Error {
+  fn from(error: std::str::Utf8Error) -> Error {
+    Error(format!("UTF8: {}", error))
+  }
+}
+
+impl From<std::string::FromUtf8Error> for Error {
+  fn from(error: std::string::FromUtf8Error) -> Error {
+    Error(format!("UTF8: {}", error))
+  }
+}
+
+
 impl<T> From<std::sync::PoisonError<T>> for Error {
   fn from(error: std::sync::PoisonError<T>) -> Error {
     Error(format!("Lock poisoned: {}", error))