diff --git a/src/bson.rs b/src/bson.rs index 12e04958..b53bfdc1 100644 --- a/src/bson.rs +++ b/src/bson.rs @@ -349,6 +349,15 @@ impl, S> From> for Bson { } } +impl From<[T; N]> for Bson +where + T: Into, +{ + fn from(value: [T; N]) -> Self { + Bson::Array(value.into_iter().map(|v| v.into()).collect()) + } +} + impl From<&[T]> for Bson where T: Clone + Into,