diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-06-18 18:06:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-18 18:06:51 +0200 |
| commit | 2c4e0a91693f2fbe9693f19c292c05e5d55dc4ee (patch) | |
| tree | e52195e65b00276d2a2fc8d2564a17d3bfd62475 /compiler/rustc_middle/src | |
| parent | ec295ad59c3e23fb68af78dc7fbf112614173545 (diff) | |
| parent | 8c83935cdf87d4e3c0d9e7796fc810fb54ecbf39 (diff) | |
| download | rust-2c4e0a91693f2fbe9693f19c292c05e5d55dc4ee.tar.gz rust-2c4e0a91693f2fbe9693f19c292c05e5d55dc4ee.zip | |
Rollup merge of #142619 - klensy:or_fun_call, r=nnethercote
apply clippy::or_fun_call Applies https://rust-lang.github.io/rust-clippy/master/index.html?groups=nursery#or_fun_call to reduce needless allocs.
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 930d9fba433..3668f4e12f5 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -1576,7 +1576,7 @@ rustc_queries! { query vtable_allocation(key: (Ty<'tcx>, Option<ty::ExistentialTraitRef<'tcx>>)) -> mir::interpret::AllocId { desc { |tcx| "vtable const allocation for <{} as {}>", key.0, - key.1.map(|trait_ref| format!("{trait_ref}")).unwrap_or("_".to_owned()) + key.1.map(|trait_ref| format!("{trait_ref}")).unwrap_or_else(|| "_".to_owned()) } } |
