2018-04-15 13:00:12 +02:00
|
|
|
error: called `map(f)` on an Result value where `f` is a unit function
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:34:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(do_nothing);
|
2018-04-15 13:00:12 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(x_field) = x.field { do_nothing(...) }`
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
= note: `-D clippy::result-map-unit-fn` implied by `-D warnings`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit function
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:36:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(do_nothing);
|
2018-04-15 13:00:12 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(x_field) = x.field { do_nothing(...) }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit function
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:38:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(diverge);
|
2018-04-15 13:00:12 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(x_field) = x.field { diverge(...) }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:44:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| x.do_result_nothing(value + captured));
|
2018-04-15 13:00:12 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { x.do_result_nothing(value + captured) }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:46:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { x.do_result_plus_one(value + captured); });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { x.do_result_plus_one(value + captured); }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:49:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| do_nothing(value + captured));
|
2018-04-15 13:00:12 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { do_nothing(value + captured) }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:51:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { do_nothing(value + captured) });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
2018-04-15 13:00:12 +02:00
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { do_nothing(value + captured) }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:53:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { do_nothing(value + captured); });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { do_nothing(value + captured); }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:55:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { { do_nothing(value + captured); } });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { do_nothing(value + captured); }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:58:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| diverge(value + captured));
|
2018-04-15 13:00:12 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { diverge(value + captured) }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:60:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { diverge(value + captured) });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
2018-04-15 13:00:12 +02:00
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { diverge(value + captured) }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:62:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { diverge(value + captured); });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { diverge(value + captured); }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:64:5
|
2018-12-11 01:31:04 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { { diverge(value + captured); } });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { diverge(value + captured); }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:69:5
|
2018-12-11 01:31:04 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { let y = plus_one(value + captured); });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { let y = plus_one(value + captured); }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:71:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { plus_one(value + captured); });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { plus_one(value + captured); }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:73:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { { plus_one(value + captured); } });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { plus_one(value + captured); }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:76:5
|
2018-12-11 01:31:04 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|ref value| { do_nothing(value + captured) });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(ref value) = x.field { do_nothing(value + captured) }`
|
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:79:5
|
2018-12-11 01:31:04 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { do_nothing(value); do_nothing(value) });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { ... }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:81:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| if value > 0 { do_nothing(value); do_nothing(value) });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(value) = x.field { ... }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:85:5
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| {
|
2018-04-15 13:00:12 +02:00
|
|
|
| _____^
|
|
|
|
| |_____|
|
|
|
|
| ||
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | || do_nothing(value);
|
|
|
|
LL | || do_nothing(value)
|
|
|
|
LL | || });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ||______^- help: try this: `if let Ok(value) = x.field { ... }`
|
2018-04-15 13:00:12 +02:00
|
|
|
| |_______|
|
|
|
|
|
|
|
|
|
|
2018-12-10 06:27:19 +01:00
|
|
|
error: called `map(f)` on an Result value where `f` is a unit closure
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:89:5
|
2018-12-10 06:27:19 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | x.field.map(|value| { do_nothing(value); do_nothing(value); });
|
2018-12-11 01:31:04 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
2018-12-10 06:27:19 +01:00
|
|
|
| |
|
2018-12-11 01:31:04 +01:00
|
|
|
| help: try this: `if let Ok(value) = x.field { ... }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit function
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:93:5
|
2018-12-27 16:57:55 +01:00
|
|
|
|
|
|
|
|
LL | "12".parse::<i32>().map(diverge);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(_) = "12".parse::<i32>() { diverge(...) }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: called `map(f)` on an Result value where `f` is a unit function
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/result_map_unit_fn.rs:99:5
|
2018-12-27 16:57:55 +01:00
|
|
|
|
|
|
|
|
LL | y.map(do_nothing);
|
|
|
|
| ^^^^^^^^^^^^^^^^^-
|
|
|
|
| |
|
|
|
|
| help: try this: `if let Ok(_y) = y { do_nothing(...) }`
|
2018-04-15 13:00:12 +02:00
|
|
|
|
|
|
|
error: aborting due to 23 previous errors
|
|
|
|
|