Skip to content

Commit ec5c13d

Browse files
authored
Merge pull request #830 from epage/into
feat(item): Add conversions from item type to Item
2 parents f550dbf + 18d0957 commit ec5c13d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

crates/toml_edit/src/item.rs

+12
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,18 @@ impl<'b> From<&'b Item> for Item {
348348
}
349349
}
350350

351+
impl From<Table> for Item {
352+
fn from(s: Table) -> Self {
353+
Item::Table(s)
354+
}
355+
}
356+
357+
impl From<ArrayOfTables> for Item {
358+
fn from(s: ArrayOfTables) -> Self {
359+
Item::ArrayOfTables(s)
360+
}
361+
}
362+
351363
impl<V: Into<Value>> From<V> for Item {
352364
fn from(s: V) -> Self {
353365
Item::Value(s.into())

0 commit comments

Comments
 (0)