diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-11-25 01:00:00 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-11-25 01:00:00 -0700 |
| commit | 893c15a2eeb16156c0b4f3e4ea815098b8f477be (patch) | |
| tree | 2ddb46c4f3f7461d5dc792ee7c0270e204f4ef81 /src/error.rs | |
| parent | da6bc6bdbf50da0eeeb4b544395c1b392d228d21 (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.rs | 13 |
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)) |