From 8ef3bf29fe47f770a52090212e3a50a0e2bc87f5 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sat, 1 Apr 2023 23:16:33 +0200 Subject: a couple clippy::complexity fixes map_identity filter_next option_as_ref_deref unnecessary_find_map redundant_slicing unnecessary_unwrap bool_comparison derivable_impls manual_flatten needless_borrowed_reference --- compiler/rustc_monomorphize/src/collector.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_monomorphize/src') diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index d34fa39352f..f41edff8513 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -651,8 +651,8 @@ fn check_type_length_limit<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) { let (shrunk, written_to_path) = shrunk_instance_name(tcx, &instance); let span = tcx.def_span(instance.def_id()); 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(path2) = written_to_path { + path = path2; Some(()) } else { None -- cgit 1.4.1-3-g733a5