From f8e909c55eaa58cbbf809c5cc59a295d369e2eea Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 16 Sep 2024 18:59:41 -0500 Subject: [PATCH] fix(edit): Allow creating Tables from Items As `From<_> for Item` forwards to `From<_> for Value`, this shouldn't be a breaking change. Fixes #785 --- crates/toml_edit/src/table.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/toml_edit/src/table.rs b/crates/toml_edit/src/table.rs index 0238b2b7..c90298f5 100644 --- a/crates/toml_edit/src/table.rs +++ b/crates/toml_edit/src/table.rs @@ -442,17 +442,17 @@ impl std::fmt::Display for Table { } } -impl, V: Into> Extend<(K, V)> for Table { +impl, V: Into> Extend<(K, V)> for Table { fn extend>(&mut self, iter: T) { for (key, value) in iter { let key = key.into(); - let value = Item::Value(value.into()); + let value = value.into(); self.items.insert(key, value); } } } -impl, V: Into> FromIterator<(K, V)> for Table { +impl, V: Into> FromIterator<(K, V)> for Table { fn from_iter(iter: I) -> Self where I: IntoIterator,