Skip to content

Commit

Permalink
clippy clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dagit committed Nov 13, 2024
1 parent 7fb1bac commit e01834b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/livesplit_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,13 +678,11 @@ impl LiveSplitCoreRenderer {
impl eframe::App for LiveSplitCoreRenderer {
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
//let update_timer = std::time::Instant::now();
if self.app_config_processed {
if self.load_errors.len() > 0 {
let mut queue: Vec<anyhow::Error> = vec![];
std::mem::swap(&mut queue, &mut self.load_errors);
for e in queue.into_iter() {
messagebox_on_error(move || Err(e))
}
if self.app_config_processed && !self.load_errors.is_empty() {
let mut queue: Vec<anyhow::Error> = vec![];
std::mem::swap(&mut queue, &mut self.load_errors);
for e in queue.into_iter() {
messagebox_on_error(move || Err(e))
}
}
if !self.app_config_processed {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ where
match f() {
Ok(()) => {}
Err(e) => {
queue.push(e.into());
queue.push(e);
}
}
}
Expand Down

0 comments on commit e01834b

Please sign in to comment.