Skip to content

Commit e0f46a1

Browse files
committed
Auto merge of #6024 - matthiaskrgr:unit_type, r=phansch
print the unit type `()` in related lint messages. changelog: print the unit type `()` in related lint messages
2 parents 8b54f1e + de195f2 commit e0f46a1

File tree

4 files changed

+44
-44
lines changed

4 files changed

+44
-44
lines changed

clippy_lints/src/map_unit_fn.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_span::source_map::Span;
99

1010
declare_clippy_lint! {
1111
/// **What it does:** Checks for usage of `option.map(f)` where f is a function
12-
/// or closure that returns the unit type.
12+
/// or closure that returns the unit type `()`.
1313
///
1414
/// **Why is this bad?** Readability, this can be written more clearly with
1515
/// an if let statement
@@ -51,7 +51,7 @@ declare_clippy_lint! {
5151

5252
declare_clippy_lint! {
5353
/// **What it does:** Checks for usage of `result.map(f)` where f is a function
54-
/// or closure that returns the unit type.
54+
/// or closure that returns the unit type `()`.
5555
///
5656
/// **Why is this bad?** Readability, this can be written more clearly with
5757
/// an if let statement
@@ -197,7 +197,7 @@ fn let_binding_name(cx: &LateContext<'_>, var_arg: &hir::Expr<'_>) -> String {
197197
#[must_use]
198198
fn suggestion_msg(function_type: &str, map_type: &str) -> String {
199199
format!(
200-
"called `map(f)` on an `{0}` value where `f` is a {1} that returns the unit type",
200+
"called `map(f)` on an `{0}` value where `f` is a {1} that returns the unit type `()`",
201201
map_type, function_type
202202
)
203203
}

tests/ui/option_map_unit_fn_fixable.stderr

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: called `map(f)` on an `Option` value where `f` is a function that returns the unit type
1+
error: called `map(f)` on an `Option` value where `f` is a function that returns the unit type `()`
22
--> $DIR/option_map_unit_fn_fixable.rs:38:5
33
|
44
LL | x.field.map(do_nothing);
@@ -8,135 +8,135 @@ LL | x.field.map(do_nothing);
88
|
99
= note: `-D clippy::option-map-unit-fn` implied by `-D warnings`
1010

11-
error: called `map(f)` on an `Option` value where `f` is a function that returns the unit type
11+
error: called `map(f)` on an `Option` value where `f` is a function that returns the unit type `()`
1212
--> $DIR/option_map_unit_fn_fixable.rs:40:5
1313
|
1414
LL | x.field.map(do_nothing);
1515
| ^^^^^^^^^^^^^^^^^^^^^^^-
1616
| |
1717
| help: try this: `if let Some(x_field) = x.field { do_nothing(x_field) }`
1818

19-
error: called `map(f)` on an `Option` value where `f` is a function that returns the unit type
19+
error: called `map(f)` on an `Option` value where `f` is a function that returns the unit type `()`
2020
--> $DIR/option_map_unit_fn_fixable.rs:42:5
2121
|
2222
LL | x.field.map(diverge);
2323
| ^^^^^^^^^^^^^^^^^^^^-
2424
| |
2525
| help: try this: `if let Some(x_field) = x.field { diverge(x_field) }`
2626

27-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
27+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
2828
--> $DIR/option_map_unit_fn_fixable.rs:48:5
2929
|
3030
LL | x.field.map(|value| x.do_option_nothing(value + captured));
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
3232
| |
3333
| help: try this: `if let Some(value) = x.field { x.do_option_nothing(value + captured) }`
3434

35-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
35+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
3636
--> $DIR/option_map_unit_fn_fixable.rs:50:5
3737
|
3838
LL | x.field.map(|value| { x.do_option_plus_one(value + captured); });
3939
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
4040
| |
4141
| help: try this: `if let Some(value) = x.field { x.do_option_plus_one(value + captured); }`
4242

43-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
43+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
4444
--> $DIR/option_map_unit_fn_fixable.rs:53:5
4545
|
4646
LL | x.field.map(|value| do_nothing(value + captured));
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
4848
| |
4949
| help: try this: `if let Some(value) = x.field { do_nothing(value + captured) }`
5050

51-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
51+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
5252
--> $DIR/option_map_unit_fn_fixable.rs:55:5
5353
|
5454
LL | x.field.map(|value| { do_nothing(value + captured) });
5555
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
5656
| |
5757
| help: try this: `if let Some(value) = x.field { do_nothing(value + captured) }`
5858

59-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
59+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
6060
--> $DIR/option_map_unit_fn_fixable.rs:57:5
6161
|
6262
LL | x.field.map(|value| { do_nothing(value + captured); });
6363
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
6464
| |
6565
| help: try this: `if let Some(value) = x.field { do_nothing(value + captured); }`
6666

67-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
67+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
6868
--> $DIR/option_map_unit_fn_fixable.rs:59:5
6969
|
7070
LL | x.field.map(|value| { { do_nothing(value + captured); } });
7171
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
7272
| |
7373
| help: try this: `if let Some(value) = x.field { do_nothing(value + captured); }`
7474

75-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
75+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
7676
--> $DIR/option_map_unit_fn_fixable.rs:62:5
7777
|
7878
LL | x.field.map(|value| diverge(value + captured));
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
8080
| |
8181
| help: try this: `if let Some(value) = x.field { diverge(value + captured) }`
8282

83-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
83+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
8484
--> $DIR/option_map_unit_fn_fixable.rs:64:5
8585
|
8686
LL | x.field.map(|value| { diverge(value + captured) });
8787
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
8888
| |
8989
| help: try this: `if let Some(value) = x.field { diverge(value + captured) }`
9090

91-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
91+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
9292
--> $DIR/option_map_unit_fn_fixable.rs:66:5
9393
|
9494
LL | x.field.map(|value| { diverge(value + captured); });
9595
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
9696
| |
9797
| help: try this: `if let Some(value) = x.field { diverge(value + captured); }`
9898

99-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
99+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
100100
--> $DIR/option_map_unit_fn_fixable.rs:68:5
101101
|
102102
LL | x.field.map(|value| { { diverge(value + captured); } });
103103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
104104
| |
105105
| help: try this: `if let Some(value) = x.field { diverge(value + captured); }`
106106

107-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
107+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
108108
--> $DIR/option_map_unit_fn_fixable.rs:73:5
109109
|
110110
LL | x.field.map(|value| { let y = plus_one(value + captured); });
111111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
112112
| |
113113
| help: try this: `if let Some(value) = x.field { let y = plus_one(value + captured); }`
114114

115-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
115+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
116116
--> $DIR/option_map_unit_fn_fixable.rs:75:5
117117
|
118118
LL | x.field.map(|value| { plus_one(value + captured); });
119119
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
120120
| |
121121
| help: try this: `if let Some(value) = x.field { plus_one(value + captured); }`
122122

123-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
123+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
124124
--> $DIR/option_map_unit_fn_fixable.rs:77:5
125125
|
126126
LL | x.field.map(|value| { { plus_one(value + captured); } });
127127
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
128128
| |
129129
| help: try this: `if let Some(value) = x.field { plus_one(value + captured); }`
130130

131-
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type
131+
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
132132
--> $DIR/option_map_unit_fn_fixable.rs:80:5
133133
|
134134
LL | x.field.map(|ref value| { do_nothing(value + captured) });
135135
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
136136
| |
137137
| help: try this: `if let Some(ref value) = x.field { do_nothing(value + captured) }`
138138

139-
error: called `map(f)` on an `Option` value where `f` is a function that returns the unit type
139+
error: called `map(f)` on an `Option` value where `f` is a function that returns the unit type `()`
140140
--> $DIR/option_map_unit_fn_fixable.rs:82:5
141141
|
142142
LL | option().map(do_nothing);}

tests/ui/result_map_unit_fn_fixable.stderr

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type
1+
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type `()`
22
--> $DIR/result_map_unit_fn_fixable.rs:35:5
33
|
44
LL | x.field.map(do_nothing);
@@ -8,127 +8,127 @@ LL | x.field.map(do_nothing);
88
|
99
= note: `-D clippy::result-map-unit-fn` implied by `-D warnings`
1010

11-
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type
11+
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type `()`
1212
--> $DIR/result_map_unit_fn_fixable.rs:37:5
1313
|
1414
LL | x.field.map(do_nothing);
1515
| ^^^^^^^^^^^^^^^^^^^^^^^-
1616
| |
1717
| help: try this: `if let Ok(x_field) = x.field { do_nothing(x_field) }`
1818

19-
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type
19+
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type `()`
2020
--> $DIR/result_map_unit_fn_fixable.rs:39:5
2121
|
2222
LL | x.field.map(diverge);
2323
| ^^^^^^^^^^^^^^^^^^^^-
2424
| |
2525
| help: try this: `if let Ok(x_field) = x.field { diverge(x_field) }`
2626

27-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
27+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
2828
--> $DIR/result_map_unit_fn_fixable.rs:45:5
2929
|
3030
LL | x.field.map(|value| x.do_result_nothing(value + captured));
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
3232
| |
3333
| help: try this: `if let Ok(value) = x.field { x.do_result_nothing(value + captured) }`
3434

35-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
35+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
3636
--> $DIR/result_map_unit_fn_fixable.rs:47:5
3737
|
3838
LL | x.field.map(|value| { x.do_result_plus_one(value + captured); });
3939
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
4040
| |
4141
| help: try this: `if let Ok(value) = x.field { x.do_result_plus_one(value + captured); }`
4242

43-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
43+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
4444
--> $DIR/result_map_unit_fn_fixable.rs:50:5
4545
|
4646
LL | x.field.map(|value| do_nothing(value + captured));
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
4848
| |
4949
| help: try this: `if let Ok(value) = x.field { do_nothing(value + captured) }`
5050

51-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
51+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
5252
--> $DIR/result_map_unit_fn_fixable.rs:52:5
5353
|
5454
LL | x.field.map(|value| { do_nothing(value + captured) });
5555
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
5656
| |
5757
| help: try this: `if let Ok(value) = x.field { do_nothing(value + captured) }`
5858

59-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
59+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
6060
--> $DIR/result_map_unit_fn_fixable.rs:54:5
6161
|
6262
LL | x.field.map(|value| { do_nothing(value + captured); });
6363
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
6464
| |
6565
| help: try this: `if let Ok(value) = x.field { do_nothing(value + captured); }`
6666

67-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
67+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
6868
--> $DIR/result_map_unit_fn_fixable.rs:56:5
6969
|
7070
LL | x.field.map(|value| { { do_nothing(value + captured); } });
7171
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
7272
| |
7373
| help: try this: `if let Ok(value) = x.field { do_nothing(value + captured); }`
7474

75-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
75+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
7676
--> $DIR/result_map_unit_fn_fixable.rs:59:5
7777
|
7878
LL | x.field.map(|value| diverge(value + captured));
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
8080
| |
8181
| help: try this: `if let Ok(value) = x.field { diverge(value + captured) }`
8282

83-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
83+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
8484
--> $DIR/result_map_unit_fn_fixable.rs:61:5
8585
|
8686
LL | x.field.map(|value| { diverge(value + captured) });
8787
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
8888
| |
8989
| help: try this: `if let Ok(value) = x.field { diverge(value + captured) }`
9090

91-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
91+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
9292
--> $DIR/result_map_unit_fn_fixable.rs:63:5
9393
|
9494
LL | x.field.map(|value| { diverge(value + captured); });
9595
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
9696
| |
9797
| help: try this: `if let Ok(value) = x.field { diverge(value + captured); }`
9898

99-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
99+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
100100
--> $DIR/result_map_unit_fn_fixable.rs:65:5
101101
|
102102
LL | x.field.map(|value| { { diverge(value + captured); } });
103103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
104104
| |
105105
| help: try this: `if let Ok(value) = x.field { diverge(value + captured); }`
106106

107-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
107+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
108108
--> $DIR/result_map_unit_fn_fixable.rs:70:5
109109
|
110110
LL | x.field.map(|value| { let y = plus_one(value + captured); });
111111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
112112
| |
113113
| help: try this: `if let Ok(value) = x.field { let y = plus_one(value + captured); }`
114114

115-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
115+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
116116
--> $DIR/result_map_unit_fn_fixable.rs:72:5
117117
|
118118
LL | x.field.map(|value| { plus_one(value + captured); });
119119
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
120120
| |
121121
| help: try this: `if let Ok(value) = x.field { plus_one(value + captured); }`
122122

123-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
123+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
124124
--> $DIR/result_map_unit_fn_fixable.rs:74:5
125125
|
126126
LL | x.field.map(|value| { { plus_one(value + captured); } });
127127
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
128128
| |
129129
| help: try this: `if let Ok(value) = x.field { plus_one(value + captured); }`
130130

131-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
131+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
132132
--> $DIR/result_map_unit_fn_fixable.rs:77:5
133133
|
134134
LL | x.field.map(|ref value| { do_nothing(value + captured) });

tests/ui/result_map_unit_fn_unfixable.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
1+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
22
--> $DIR/result_map_unit_fn_unfixable.rs:23:5
33
|
44
LL | x.field.map(|value| { do_nothing(value); do_nothing(value) });
@@ -8,15 +8,15 @@ LL | x.field.map(|value| { do_nothing(value); do_nothing(value) });
88
|
99
= note: `-D clippy::result-map-unit-fn` implied by `-D warnings`
1010

11-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
11+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
1212
--> $DIR/result_map_unit_fn_unfixable.rs:25:5
1313
|
1414
LL | x.field.map(|value| if value > 0 { do_nothing(value); do_nothing(value) });
1515
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
1616
| |
1717
| help: try this: `if let Ok(value) = x.field { ... }`
1818

19-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
19+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
2020
--> $DIR/result_map_unit_fn_unfixable.rs:29:5
2121
|
2222
LL | x.field.map(|value| {
@@ -30,23 +30,23 @@ LL | || });
3030
| |_______|
3131
|
3232

33-
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type
33+
error: called `map(f)` on an `Result` value where `f` is a closure that returns the unit type `()`
3434
--> $DIR/result_map_unit_fn_unfixable.rs:33:5
3535
|
3636
LL | x.field.map(|value| { do_nothing(value); do_nothing(value); });
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
3838
| |
3939
| help: try this: `if let Ok(value) = x.field { ... }`
4040

41-
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type
41+
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type `()`
4242
--> $DIR/result_map_unit_fn_unfixable.rs:37:5
4343
|
4444
LL | "12".parse::<i32>().map(diverge);
4545
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
4646
| |
4747
| help: try this: `if let Ok(a) = "12".parse::<i32>() { diverge(a) }`
4848

49-
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type
49+
error: called `map(f)` on an `Result` value where `f` is a function that returns the unit type `()`
5050
--> $DIR/result_map_unit_fn_unfixable.rs:43:5
5151
|
5252
LL | y.map(do_nothing);

0 commit comments

Comments
 (0)