Skip to content

Commit eeb853b

Browse files
authored
Merge pull request #22 from leiysky/main
chore: implement `From` trait with owned `JsonValue` for `Value`
2 parents a9cccc7 + 3aefb22 commit eeb853b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/from.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ impl<'a> From<&JsonValue> for Value<'a> {
182182
}
183183
}
184184

185+
impl<'a> From<JsonValue> for Value<'a> {
186+
fn from(value: JsonValue) -> Self {
187+
(&value).into()
188+
}
189+
}
190+
185191
impl<'a> From<Value<'a>> for JsonValue {
186192
fn from(value: Value<'a>) -> Self {
187193
match value {

0 commit comments

Comments
 (0)