mirror of
https://github.com/clap-rs/clap
synced 2024-12-05 02:29:12 +00:00
chore(ci): Clarify why map_or is banned
This commit is contained in:
parent
8edf8c7676
commit
13f9836ebe
1 changed files with 6 additions and 4 deletions
10
.clippy.toml
10
.clippy.toml
|
@ -4,8 +4,10 @@ allow-expect-in-tests = true
|
|||
allow-unwrap-in-tests = true
|
||||
allow-dbg-in-tests = true
|
||||
disallowed-methods = [
|
||||
{ path = "std::option::Option::map_or", reason = "use `map(..).unwrap_or(..)`" },
|
||||
{ path = "std::option::Option::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" },
|
||||
{ path = "std::result::Result::map_or", reason = "use `map(..).unwrap_or(..)`" },
|
||||
{ path = "std::result::Result::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" },
|
||||
{ path = "std::option::Option::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
|
||||
{ path = "std::option::Option::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
|
||||
{ path = "std::result::Result::map_or", reason = "prefer `map(..).unwrap_or(..)` for legibility" },
|
||||
{ path = "std::result::Result::map_or_else", reason = "prefer `map(..).unwrap_or_else(..)` for legibility" },
|
||||
{ path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" },
|
||||
{ path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" },
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue