Fix redundant closures in tests

We don't have the tests checked by clippy on CI, despite [passing the
`--all-targets`](5536cd1f9e/.travis.yml (L46)),
but VSCode+RLS display warnings for these.

See: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
This commit is contained in:
Nickolay Ponomarev 2019-06-09 17:05:19 +03:00
parent b6dac5099d
commit 99768711dc

View file

@ -1902,7 +1902,7 @@ fn parse_drop_table() {
assert_eq!(SQLObjectType::Table, object_type);
assert_eq!(
vec!["foo"],
names.iter().map(|n| n.to_string()).collect::<Vec<_>>()
names.iter().map(ToString::to_string).collect::<Vec<_>>()
);
assert_eq!(false, cascade);
}
@ -1921,7 +1921,7 @@ fn parse_drop_table() {
assert_eq!(SQLObjectType::Table, object_type);
assert_eq!(
vec!["foo", "bar"],
names.iter().map(|n| n.to_string()).collect::<Vec<_>>()
names.iter().map(ToString::to_string).collect::<Vec<_>>()
);
assert_eq!(true, cascade);
}
@ -1950,7 +1950,7 @@ fn parse_drop_view() {
} => {
assert_eq!(
vec!["myschema.myview"],
names.iter().map(|n| n.to_string()).collect::<Vec<_>>()
names.iter().map(ToString::to_string).collect::<Vec<_>>()
);
assert_eq!(SQLObjectType::View, object_type);
}