2023-07-31 16:53:53 -05:00
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:46:14
|
2021-12-30 08:10:43 -06:00
|
|
|
|
|
|
|
|
LL | with_new.unwrap_or_else(Vec::new);
|
2023-07-31 16:53:53 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2021-12-30 08:10:43 -06:00
|
|
|
|
|
2023-07-31 16:53:53 -05:00
|
|
|
= note: `-D clippy::unwrap-or-default` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::unwrap_or_default)]`
|
2021-12-30 08:10:43 -06:00
|
|
|
|
2023-07-31 16:53:53 -05:00
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:60:23
|
2021-08-12 04:16:25 -05:00
|
|
|
|
|
|
|
|
LL | with_real_default.unwrap_or_else(<HasDefaultAndDuplicate as Default>::default);
|
2023-07-31 16:53:53 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2021-08-12 04:16:25 -05:00
|
|
|
|
2023-07-31 16:53:53 -05:00
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:63:24
|
2021-08-12 04:16:25 -05:00
|
|
|
|
|
|
|
|
LL | with_default_trait.unwrap_or_else(Default::default);
|
2023-07-31 16:53:53 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2021-08-12 04:16:25 -05:00
|
|
|
|
2023-07-31 16:53:53 -05:00
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:66:23
|
2021-08-12 04:16:25 -05:00
|
|
|
|
|
|
|
|
LL | with_default_type.unwrap_or_else(u64::default);
|
2023-07-31 16:53:53 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2021-08-12 04:16:25 -05:00
|
|
|
|
2023-07-31 16:53:53 -05:00
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:69:23
|
2021-12-30 08:10:43 -06:00
|
|
|
|
|
|
|
|
LL | with_default_type.unwrap_or_else(Vec::new);
|
2023-07-31 16:53:53 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2021-12-30 08:10:43 -06:00
|
|
|
|
2023-07-31 16:53:53 -05:00
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:72:18
|
2022-09-09 06:36:26 -05:00
|
|
|
|
|
|
|
|
LL | empty_string.unwrap_or_else(|| "".to_string());
|
2023-07-31 16:53:53 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2022-09-09 06:36:26 -05:00
|
|
|
|
2023-07-31 16:53:53 -05:00
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:76:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:79:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:82:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:85:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:88:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:91:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:94:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:97:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `unwrap_or_else` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:113:12
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | option.unwrap_or_else(Vec::new).push(1);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
|
|
|
|
|
|
|
error: use of `or_insert_with` to construct default value
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/unwrap_or_else_default.rs:130:32
|
2023-07-31 16:53:53 -05:00
|
|
|
|
|
|
|
|
LL | let _ = inner_map.entry(0).or_insert_with(Default::default);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
|
|
|
|
|
|
|
error: aborting due to 16 previous errors
|
2021-08-12 04:16:25 -05:00
|
|
|
|