Fix more Clippy warnings

cargo clippy -- -W clippy::correctness
This commit is contained in:
Thibaut Brandscheid
2019-12-07 10:34:32 +01:00
parent dfa5173cf4
commit 683f4c35d9
21 changed files with 395 additions and 455 deletions

View File

@ -20,12 +20,12 @@ impl PrettyDebug for PositionalType {
fn pretty(&self) -> DebugDocBuilder {
match self {
PositionalType::Mandatory(string, shape) => {
b::description(string) + b::delimit("(", shape.pretty(), ")").as_kind().group()
b::description(string) + b::delimit("(", shape.pretty(), ")").into_kind().group()
}
PositionalType::Optional(string, shape) => {
b::description(string)
+ b::operator("?")
+ b::delimit("(", shape.pretty(), ")").as_kind().group()
+ b::delimit("(", shape.pretty(), ")").into_kind().group()
}
}
}