diff options
author | tcmal <me@aria.rip> | 2024-06-05 20:54:29 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-06-05 20:54:29 +0100 |
commit | c6a963cd43cadff083bfdf4454cdef2d8ddd2070 (patch) | |
tree | ed81f4af5eaaf3fd1286f5963104cea7fd8c55da /src/error.rs | |
parent | 8b3f379c3b3216485d11787bcd63a56acd51ee58 (diff) |
some cleanup and lints
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/error.rs b/src/error.rs index e12ae2c..3086204 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,7 +1,9 @@ use thiserror::Error; +/// The Result type used throughout pub type Result<T, E = Error> = std::result::Result<T, E>; +/// All errors that can be encountered when running #[derive(Debug, Error)] pub enum Error { #[error("xcb returned screen that doesn't exist")] @@ -10,12 +12,12 @@ pub enum Error { #[error("other wm is running")] OtherWMRunning, + #[error("generic xcb error: {0}")] + Xcb(#[from] xcb::Error), + #[error("connection error: {0}")] - ConnectionError(#[from] xcb::ConnError), + Connection(#[from] xcb::ConnError), #[error("protocol error: {0}")] - ProtocolError(#[from] xcb::ProtocolError), - - #[error("generic xcb error: {0}")] - XCBError(#[from] xcb::Error), + Protocol(#[from] xcb::ProtocolError), } |