2019-04-11 05:47:04 +00:00
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:53:22
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | with_constructor.unwrap_or(make());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(make)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::or-fun-call` implied by `-D warnings`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:56:14
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | with_new.unwrap_or(Vec::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:59:21
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | with_const_args.unwrap_or(Vec::with_capacity(12));
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| Vec::with_capacity(12))`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:62:14
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | with_err.unwrap_or(make());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| make())`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:65:19
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | with_err_args.unwrap_or(Vec::with_capacity(12));
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| Vec::with_capacity(12))`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `default`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:68:24
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | with_default_trait.unwrap_or(Default::default());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `default`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:71:23
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | with_default_type.unwrap_or(u64::default());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
2021-08-12 09:16:25 +00:00
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:74:18
|
2021-08-12 09:16:25 +00:00
|
|
|
|
|
|
|
|
LL | self_default.unwrap_or(<FakeDefault>::default());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(<FakeDefault>::default)`
|
2021-08-12 09:16:25 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `default`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:77:18
|
2021-08-12 09:16:25 +00:00
|
|
|
|
|
|
|
|
LL | real_default.unwrap_or(<FakeDefault as Default>::default());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2021-08-12 09:16:25 +00:00
|
|
|
|
2020-04-01 18:14:05 +00:00
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:80:14
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | with_vec.unwrap_or(vec![]);
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:83:21
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
|
|
|
LL | without_default.unwrap_or(Foo::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(Foo::new)`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
2022-09-09 11:36:26 +00:00
|
|
|
error: use of `or_insert` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:86:19
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
|
LL | map.entry(42).or_insert(String::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
error: use of `or_insert` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:89:23
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
|
LL | map_vec.entry(42).or_insert(vec![]);
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
error: use of `or_insert` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:92:21
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
|
LL | btree.entry(42).or_insert(String::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
error: use of `or_insert` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:95:25
|
2022-09-09 11:36:26 +00:00
|
|
|
|
|
|
|
|
LL | btree_vec.entry(42).or_insert(vec![]);
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
2022-09-09 11:36:26 +00:00
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:98:21
|
2019-04-11 05:47:04 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | let _ = stringy.unwrap_or(String::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2019-04-11 05:47:04 +00:00
|
|
|
|
2020-11-23 12:51:04 +00:00
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:106:21
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Some(1).unwrap_or(map[&1]);
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| map[&1])`
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:108:21
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Some(1).unwrap_or(map[&1]);
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| map[&1])`
|
2020-11-23 12:51:04 +00:00
|
|
|
|
2019-05-12 08:18:38 +00:00
|
|
|
error: use of `or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:132:35
|
2019-05-12 08:18:38 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Some("a".to_string()).or(Some("b".to_string()));
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_else(|| Some("b".to_string()))`
|
2019-05-12 08:18:38 +00:00
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:171:14
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2021-12-06 11:33:31 +00:00
|
|
|
LL | None.unwrap_or(ptr_to_ref(s));
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| ptr_to_ref(s))`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:177:14
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2021-12-06 11:33:31 +00:00
|
|
|
LL | None.unwrap_or(unsafe { ptr_to_ref(s) });
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| unsafe { ptr_to_ref(s) })`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:179:14
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
2021-12-06 11:33:31 +00:00
|
|
|
LL | None.unwrap_or( unsafe { ptr_to_ref(s) } );
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| unsafe { ptr_to_ref(s) })`
|
2021-03-25 18:29:11 +00:00
|
|
|
|
2022-01-17 12:29:07 +00:00
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:193:14
|
2022-01-17 12:29:07 +00:00
|
|
|
|
|
2022-07-18 07:39:37 +00:00
|
|
|
LL | .unwrap_or(String::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2022-01-17 12:29:07 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:206:14
|
2022-01-17 12:29:07 +00:00
|
|
|
|
|
2022-07-18 07:39:37 +00:00
|
|
|
LL | .unwrap_or(String::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2022-01-17 12:29:07 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:218:14
|
2022-01-17 12:29:07 +00:00
|
|
|
|
|
2022-07-18 07:39:37 +00:00
|
|
|
LL | .unwrap_or(String::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2022-01-17 12:29:07 +00:00
|
|
|
|
|
|
|
error: use of `unwrap_or` followed by a call to `new`
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:229:10
|
2022-01-17 12:29:07 +00:00
|
|
|
|
|
2022-07-18 07:39:37 +00:00
|
|
|
LL | .unwrap_or(String::new());
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
2022-01-17 12:29:07 +00:00
|
|
|
|
2022-11-21 19:34:47 +00:00
|
|
|
error: use of `map_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:254:25
|
2022-11-21 19:34:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Some(4).map_or(g(), |v| v);
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: try: `map_or_else(g, |v| v)`
|
2022-11-21 19:34:47 +00:00
|
|
|
|
|
|
|
error: use of `map_or` followed by a function call
|
2023-07-17 08:19:29 +00:00
|
|
|
--> $DIR/or_fun_call.rs:255:25
|
2022-11-21 19:34:47 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Some(4).map_or(g(), f);
|
2023-07-17 08:19:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^ help: try: `map_or_else(g, f)`
|
2022-11-21 19:34:47 +00:00
|
|
|
|
|
|
|
error: aborting due to 28 previous errors
|
2019-04-11 05:47:04 +00:00
|
|
|
|