Some clippy fixes
This commit is contained in:
parent
b7ec3fa1e3
commit
20b0637d42
|
|
@ -99,11 +99,12 @@ impl crate::Storage for FileStorage {
|
|||
join_handle.join().ok();
|
||||
}
|
||||
|
||||
match std::thread::Builder::new()
|
||||
let result = std::thread::Builder::new()
|
||||
.name("eframe_persist".to_owned())
|
||||
.spawn(move || {
|
||||
save_to_disk(&file_path, &kv);
|
||||
}) {
|
||||
});
|
||||
match result {
|
||||
Ok(join_handle) => {
|
||||
self.last_save_join_handle = Some(join_handle);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -521,9 +521,7 @@ impl Focus {
|
|||
}
|
||||
}
|
||||
|
||||
let Some(current_focused) = self.focused_widget else {
|
||||
return None;
|
||||
};
|
||||
let current_focused = self.focused_widget?;
|
||||
|
||||
// In what direction we are looking for the next widget.
|
||||
let search_direction = match self.focus_direction {
|
||||
|
|
@ -546,9 +544,7 @@ impl Focus {
|
|||
}
|
||||
});
|
||||
|
||||
let Some(current_rect) = self.focus_widgets_cache.get(¤t_focused.id) else {
|
||||
return None;
|
||||
};
|
||||
let current_rect = self.focus_widgets_cache.get(¤t_focused.id)?;
|
||||
|
||||
let mut best_score = std::f32::INFINITY;
|
||||
let mut best_id = None;
|
||||
|
|
|
|||
Loading…
Reference in New Issue