1
Fork 0

clippy::complexity fixes

filter_next
needless_question_mark
bind_instead_of_map
manual_find
derivable_impls
map_identity
redundant_slicing
skip_while_next
unnecessary_unwrap
needless_bool
This commit is contained in:
Matthias Krüger 2022-12-18 12:45:56 +01:00
parent 48b3c46126
commit 1da4a49912
15 changed files with 26 additions and 54 deletions

View file

@ -595,8 +595,8 @@ fn check_recursion_limit<'tcx>(
let def_path_str = tcx.def_path_str(def_id);
let (shrunk, written_to_path) = shrunk_instance_name(tcx, &instance);
let mut path = PathBuf::new();
let was_written = if written_to_path.is_some() {
path = written_to_path.unwrap();
let was_written = if let Some(written_to_path) = written_to_path {
path = written_to_path;
Some(())
} else {
None