You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clippy suggests replacing variable start with start and end with end used in range syntax.
I guess that is because the syntax is syntactic sugar and structs resulting from desugaring have fields with these names.
IMHO we should make an exception to treat these range syntax.
warning: redundant field names in struct initialization
--> src/main.rs:3:13
|
3 | let _ = start..;
| ^^^^^ help:replace it with: `start`
|
= note:#[warn(redundant_field_names)] on by default
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.187/index.html#redundant_field_names
warning: redundant field names in struct initialization
--> src/main.rs:6:15
|
6 | let _ = ..end;
| ^^^ help:replace it with: `end`
|
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.187/index.html#redundant_field_names
warning: redundant field names in struct initialization
--> src/main.rs:8:13
|
8 | let _ = start..end;
| ^^^^^ help: replace it with: `start`
|
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.187/index.html#redundant_field_names
warning: redundant field names in structinitialization
--> src/main.rs:8:20
|
8 | let _ = start..end;
| ^^^ help: replace it with: `end`
|
= help:for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.187/index.html#redundant_field_names
The text was updated successfully, but these errors were encountered:
Playground
Clippy suggests replacing variable
start
withstart
andend
withend
used in range syntax.I guess that is because the syntax is syntactic sugar and structs resulting from desugaring have fields with these names.
IMHO we should make an exception to treat these range syntax.
The text was updated successfully, but these errors were encountered: