remove stale comments
Browse files
+1 −20 src/window_manager.rs
| @@ -36,6 +36,7 @@ pub struct WindowManager { | |||
| 36 | bar: Bar, | 36 | bar: Bar, |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | +// TODO: Eliminate all library level `anyhow::Error` | ||
| 39 | #[derive(Debug)] | 40 | #[derive(Debug)] |
| 40 | #[non_exhaustive] | 41 | #[non_exhaustive] |
| 41 | pub enum WindowManagerError { | 42 | pub enum WindowManagerError { |
| @@ -77,19 +78,6 @@ impl std::fmt::Display for X11Error { | |||
| 77 | } | 78 | } |
| 78 | } | 79 | } |
| 79 | 80 | ||
| 80 | -// impl<T: std::error::Error + Send + Sync + 'static> From<T> for WindowManagerError { | ||
| 81 | -// fn from(value: T) -> Self { | ||
| 82 | -// Self::Anyhow(value.into()) | ||
| 83 | -// } | ||
| 84 | -// } | ||
| 85 | - | ||
| 86 | -// TODO: Eliminate all library level `anyhow::Error` | ||
| 87 | -// impl<E: Into<anyhow::Error>> From<E> for WindowManagerError { | ||
| 88 | -// fn from(value: E) -> Self { | ||
| 89 | -// Self::Anyhow(value.into()) | ||
| 90 | -// } | ||
| 91 | -// } | ||
| 92 | - | ||
| 93 | impl From<X11Error> for WindowManagerError { | 81 | impl From<X11Error> for WindowManagerError { |
| 94 | fn from(value: X11Error) -> Self { | 82 | fn from(value: X11Error) -> Self { |
| 95 | Self::X11(value) | 83 | Self::X11(value) |
| @@ -126,13 +114,6 @@ impl From<anyhow::Error> for WindowManagerError { | |||
| 126 | } | 114 | } |
| 127 | } | 115 | } |
| 128 | 116 | ||
| 129 | -// Potentiel Errors: | ||
| 130 | -// ::new -> x11rb::errors::ConnectError | ||
| 131 | -// ::new -> x11rb::errors::ReplyError | ||
| 132 | -// ::new -> x11rb::errors::ConnectionError | ||
| 133 | -// ::new -> x11rb::errors::ReplyOrIdError | ||
| 134 | -// | ||
| 135 | -// ::needs_recompile -> io::Result | ||
| 136 | impl WindowManager { | 117 | impl WindowManager { |
| 137 | pub fn new(config: Config) -> std::result::Result<Self, WindowManagerError> { | 118 | pub fn new(config: Config) -> std::result::Result<Self, WindowManagerError> { |
| 138 | let (connection, screen_number) = x11rb::connect(None)?; | 119 | let (connection, screen_number) = x11rb::connect(None)?; |