about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-04-02 10:08:34 +0200
committerGitHub <noreply@github.com>2023-04-02 10:08:34 +0200
commite2ffe151a3f7e58d8623e67ba7ce97c25c3ae414 (patch)
treef848e9ebd5d9e72e0cdde1662b6575f877302d0a /compiler/rustc_monomorphize/src
parent099f3469a9cc15fb7892a4cc1548f5ce150392c6 (diff)
parent8ef3bf29fe47f770a52090212e3a50a0e2bc87f5 (diff)
Rollup merge of #109844 - matthiaskrgr:clippy2023_04, r=Nilstrieb
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
Diffstat (limited to 'compiler/rustc_monomorphize/src')
-rw-r--r--compiler/rustc_monomorphize/src/collector.rs4
1 files changed, 2 insertions, 2 deletions
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