Skip to content

Commit 6c98831

Browse files
committed
Fix String conversion cases
1 parent 79bd83e commit 6c98831

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bson.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ impl<'a> From<&'a str> for Bson {
127127

128128
impl From<String> for Bson {
129129
fn from(a: String) -> Bson {
130+
Bson::String(a)
131+
}
132+
}
133+
134+
impl<'a> From<&'a String> for Bson {
135+
fn from(a: &'a String) -> Bson {
130136
Bson::String(a.to_owned())
131137
}
132138
}

0 commit comments

Comments
 (0)