Diff
diff --git a/src/bar/bar.rs b/src/bar/bar.rs
index 86f97e7..23d6af5 100644
--- a/src/bar/bar.rs
+++ b/src/bar/bar.rs
@@ -1,6 +1,7 @@
use super::blocks::Block;
use super::font::{Font, FontDraw};
use crate::Config;
+use crate::window_manager::X11Error;
use anyhow::Result;
use std::time::Instant;
use x11rb::COPY_DEPTH_FROM_PARENT;
@@ -148,7 +149,7 @@ impl Bar {
self.needs_redraw = true;
}
- pub fn update_blocks(&mut self) -> Result<()> {
+ pub fn update_blocks(&mut self) {
let now = Instant::now();
let mut changed = false;
@@ -173,8 +174,6 @@ impl Bar {
self.status_text = parts.join("");
self.needs_redraw = true;
}
-
- Ok(())
}
pub fn draw(
@@ -182,7 +181,7 @@ impl Bar {
connection: &RustConnection,
current_tags: u32,
occupied_tags: u32,
- ) -> Result<()> {
+ ) -> std::result::Result<(), X11Error> {
if !self.needs_redraw {
return Ok(());
}
diff --git a/src/window_manager.rs b/src/window_manager.rs
index f3eeb75..9d809f3 100644
--- a/src/window_manager.rs
+++ b/src/window_manager.rs
@@ -378,8 +378,7 @@ impl WindowManager {
self.update_bar()?;
loop {
- // TODO: Identify errors
- self.bar.update_blocks()?;
+ self.bar.update_blocks();
if let Ok(Some(event)) = self.connection.poll_for_event() {
if let Some(should_restart) = self.handle_event(event)? {
@@ -436,7 +435,6 @@ impl WindowManager {
}
self.bar.invalidate();
- // TODO: Identify errors
self.bar
.draw(&self.connection, self.selected_tags, occupied_tags)?;
Ok(())