clippy & deny fixes

This commit is contained in:
2025-02-07 00:15:21 -07:00
parent e8de35b78e
commit 561a9107e2
9 changed files with 17 additions and 28 deletions

View File

@@ -384,7 +384,7 @@ fn object_context_ui(ui: &mut egui::Ui, object: &ObjectConfig) {
.clicked()
{
log::info!("Opening file {}", source_path);
if let Err(e) = open::that_detached(&source_path) {
if let Err(e) = open::that_detached(source_path) {
log::error!("Failed to open source file: {e}");
}
ui.close_menu();

View File

@@ -150,7 +150,7 @@ pub fn diff_view_ui(
navigation.view = View::SymbolDiff;
}
// Execute navigation if it changed
if navigation != current_navigation && !state.post_build_nav.is_some() {
if navigation != current_navigation && state.post_build_nav.is_none() {
ret = Some(DiffViewAction::Navigate(navigation));
}

View File

@@ -262,11 +262,8 @@ impl DiffViewState {
DiffViewAction::SetSearch(search) => {
self.search_regex = if search.is_empty() {
None
} else if let Ok(regex) = RegexBuilder::new(&search).case_insensitive(true).build()
{
Some(regex)
} else {
None
RegexBuilder::new(&search).case_insensitive(true).build().ok()
};
self.search = search;
}