summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/or_fun_call.fixed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
commit2ff14448863ac1a1dd9533461708e29aae170c2d (patch)
tree85b9fea2bbfe3f06473cfa381eed11f273b57c5c /src/tools/clippy/tests/ui/or_fun_call.fixed
parentAdding debian version 1.64.0+dfsg1-1. (diff)
downloadrustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz
rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/tests/ui/or_fun_call.fixed12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/clippy/tests/ui/or_fun_call.fixed b/src/tools/clippy/tests/ui/or_fun_call.fixed
index fdb08d953..5991188ab 100644
--- a/src/tools/clippy/tests/ui/or_fun_call.fixed
+++ b/src/tools/clippy/tests/ui/or_fun_call.fixed
@@ -79,19 +79,19 @@ fn or_fun_call() {
without_default.unwrap_or_else(Foo::new);
let mut map = HashMap::<u64, String>::new();
- map.entry(42).or_insert(String::new());
+ map.entry(42).or_default();
let mut map_vec = HashMap::<u64, Vec<i32>>::new();
- map_vec.entry(42).or_insert(vec![]);
+ map_vec.entry(42).or_default();
let mut btree = BTreeMap::<u64, String>::new();
- btree.entry(42).or_insert(String::new());
+ btree.entry(42).or_default();
let mut btree_vec = BTreeMap::<u64, Vec<i32>>::new();
- btree_vec.entry(42).or_insert(vec![]);
+ btree_vec.entry(42).or_default();
- let stringy = Some(String::from(""));
- let _ = stringy.unwrap_or_else(|| "".to_owned());
+ let stringy = Some(String::new());
+ let _ = stringy.unwrap_or_default();
let opt = Some(1);
let hello = "Hello";