Fix clippy warnings (#4176)

This commit is contained in:
JT
2021-12-03 07:05:38 +13:00
committed by GitHub
parent c00853a473
commit c08e145501
12 changed files with 277 additions and 264 deletions

View File

@ -61,7 +61,7 @@ pub fn value_to_bson_value(v: &Value) -> Result<Bson, ShellError> {
UntaggedValue::Primitive(Primitive::FilePath(s)) => Bson::String(s.display().to_string()),
UntaggedValue::Table(l) => Bson::Array(
l.iter()
.map(|x| value_to_bson_value(x))
.map(value_to_bson_value)
.collect::<Result<_, _>>()?,
),
UntaggedValue::Block(_) | UntaggedValue::Primitive(Primitive::Range(_)) => Bson::Null,