diff --git a/asyncgit/src/sync/commit_filter.rs b/asyncgit/src/sync/commit_filter.rs index f4b3e8a6..229e41d0 100644 --- a/asyncgit/src/sync/commit_filter.rs +++ b/asyncgit/src/sync/commit_filter.rs @@ -198,22 +198,22 @@ pub fn filter_commit_by_search( .flatten() .is_some_and(|diff| filter.match_diff(&diff)); - let authors_match = filter + let authors_match = if filter .options .fields .contains(SearchFields::AUTHORS) - .then(|| { - let author = - get_author_of_commit(&commit, &mailmap); - [author.email(), author.name()].iter().any( - |opt_haystack| { - opt_haystack.is_some_and(|haystack| { - filter.match_text(haystack) - }) - }, - ) - }) - .unwrap_or_default(); + { + let author = get_author_of_commit(&commit, &mailmap); + [author.email(), author.name()].iter().any( + |opt_haystack| { + opt_haystack.is_some_and(|haystack| { + filter.match_text(haystack) + }) + }, + ) + } else { + false + }; Ok(msg_summary_match || msg_body_match diff --git a/build.rs b/build.rs index 4e1e352b..382490cf 100644 --- a/build.rs +++ b/build.rs @@ -44,6 +44,6 @@ fn main() { format!("nightly {} ({})", build_date, get_git_hash()) }; - println!("cargo:warning=buildname '{}'", build_name); - println!("cargo:rustc-env=GITUI_BUILD_NAME={}", build_name); + println!("cargo:warning=buildname '{build_name}'"); + println!("cargo:rustc-env=GITUI_BUILD_NAME={build_name}"); }