Skip to content

Commit 8247d27

Browse files
authored
Implement From<&mut T> for Bson (#452)
1 parent 622007d commit 8247d27

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bson.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ where
237237
}
238238
}
239239

240+
impl<T> From<&mut T> for Bson
241+
where
242+
for<'a> &'a T: Into<Bson>,
243+
{
244+
fn from(t: &mut T) -> Bson {
245+
(&*t).into()
246+
}
247+
}
248+
240249
impl<T> From<Vec<T>> for Bson
241250
where
242251
T: Into<Bson>,

0 commit comments

Comments
 (0)