2019-04-11 00:47:04 -05:00
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:48:22
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | with_constructor.unwrap_or(make());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(make)`
|
2021-12-06 05:33:31 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::or-fun-call` implied by `-D warnings`
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:51:14
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | with_new.unwrap_or(Vec::new());
|
2022-07-18 02:39:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:54:21
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | with_const_args.unwrap_or(Vec::with_capacity(12));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| Vec::with_capacity(12))`
|
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:57:14
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | with_err.unwrap_or(make());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| make())`
|
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:60:19
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | with_err_args.unwrap_or(Vec::with_capacity(12));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| Vec::with_capacity(12))`
|
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `default`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:63:24
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | with_default_trait.unwrap_or(Default::default());
|
2022-07-18 02:39:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `default`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:66:23
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | with_default_type.unwrap_or(u64::default());
|
2022-07-18 02:39:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2019-04-11 00:47:04 -05:00
|
|
|
|
2021-08-12 04:16:25 -05:00
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:69:18
|
2021-08-12 04:16:25 -05:00
|
|
|
|
|
|
|
|
LL | self_default.unwrap_or(<FakeDefault>::default());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(<FakeDefault>::default)`
|
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `default`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:72:18
|
2021-08-12 04:16:25 -05:00
|
|
|
|
|
|
|
|
LL | real_default.unwrap_or(<FakeDefault as Default>::default());
|
2022-07-18 02:39:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2021-08-12 04:16:25 -05:00
|
|
|
|
2020-04-01 13:14:05 -05:00
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:75:14
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | with_vec.unwrap_or(vec![]);
|
2022-07-18 02:39:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:78:21
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
|
|
|
LL | without_default.unwrap_or(Foo::new());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(Foo::new)`
|
|
|
|
|
2022-09-09 06:36:26 -05:00
|
|
|
error: use of `or_insert` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:81:19
|
2022-09-09 06:36:26 -05:00
|
|
|
|
|
|
|
|
LL | map.entry(42).or_insert(String::new());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_default()`
|
|
|
|
|
|
|
|
error: use of `or_insert` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:84:23
|
2022-09-09 06:36:26 -05:00
|
|
|
|
|
|
|
|
LL | map_vec.entry(42).or_insert(vec![]);
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try this: `or_default()`
|
|
|
|
|
|
|
|
error: use of `or_insert` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:87:21
|
2022-09-09 06:36:26 -05:00
|
|
|
|
|
|
|
|
LL | btree.entry(42).or_insert(String::new());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_default()`
|
|
|
|
|
|
|
|
error: use of `or_insert` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:90:25
|
2022-09-09 06:36:26 -05:00
|
|
|
|
|
|
|
|
LL | btree_vec.entry(42).or_insert(vec![]);
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try this: `or_default()`
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:93:21
|
2019-04-11 00:47:04 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | let _ = stringy.unwrap_or(String::new());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2019-04-11 00:47:04 -05:00
|
|
|
|
2020-11-23 06:51:04 -06:00
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:101:21
|
2020-11-23 06:51:04 -06:00
|
|
|
|
|
|
|
|
LL | let _ = Some(1).unwrap_or(map[&1]);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| map[&1])`
|
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:103:21
|
2020-11-23 06:51:04 -06:00
|
|
|
|
|
|
|
|
LL | let _ = Some(1).unwrap_or(map[&1]);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| map[&1])`
|
|
|
|
|
2019-05-12 03:18:38 -05:00
|
|
|
error: use of `or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:127:35
|
2019-05-12 03:18:38 -05:00
|
|
|
|
|
|
|
|
LL | let _ = Some("a".to_string()).or(Some("b".to_string()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some("b".to_string()))`
|
|
|
|
|
2021-03-25 13:29:11 -05:00
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:166:14
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
2021-12-06 05:33:31 -06:00
|
|
|
LL | None.unwrap_or(ptr_to_ref(s));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| ptr_to_ref(s))`
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:172:14
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
2021-12-06 05:33:31 -06:00
|
|
|
LL | None.unwrap_or(unsafe { ptr_to_ref(s) });
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| unsafe { ptr_to_ref(s) })`
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:174:14
|
2021-03-25 13:29:11 -05:00
|
|
|
|
|
2021-12-06 05:33:31 -06:00
|
|
|
LL | None.unwrap_or( unsafe { ptr_to_ref(s) } );
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| unsafe { ptr_to_ref(s) })`
|
2021-03-25 13:29:11 -05:00
|
|
|
|
2022-01-17 06:29:07 -06:00
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:188:14
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
2022-07-18 02:39:37 -05:00
|
|
|
LL | .unwrap_or(String::new());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:201:14
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
2022-07-18 02:39:37 -05:00
|
|
|
LL | .unwrap_or(String::new());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:213:14
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
2022-07-18 02:39:37 -05:00
|
|
|
LL | .unwrap_or(String::new());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2022-10-06 02:44:38 -05:00
|
|
|
--> $DIR/or_fun_call.rs:224:10
|
2022-01-17 06:29:07 -06:00
|
|
|
|
|
2022-07-18 02:39:37 -05:00
|
|
|
LL | .unwrap_or(String::new());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_default()`
|
2022-01-17 06:29:07 -06:00
|
|
|
|
2022-09-09 06:36:26 -05:00
|
|
|
error: aborting due to 26 previous errors
|
2019-04-11 00:47:04 -05:00
|
|
|
|