diff options
Diffstat (limited to 'vendor/toml_edit/src/item.rs')
-rw-r--r-- | vendor/toml_edit/src/item.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/vendor/toml_edit/src/item.rs b/vendor/toml_edit/src/item.rs index 48a1a3566..2025fd916 100644 --- a/vendor/toml_edit/src/item.rs +++ b/vendor/toml_edit/src/item.rs @@ -7,7 +7,7 @@ use crate::table::TableLike; use crate::{Array, InlineTable, Table, Value}; /// Type representing either a value, a table, an array of tables, or none. -#[derive(Debug, Clone)] +#[derive(Debug)] pub enum Item { /// Type representing none. None, @@ -316,6 +316,18 @@ impl Item { } } +impl Clone for Item { + #[inline(never)] + fn clone(&self) -> Self { + match self { + Item::None => Item::None, + Item::Value(v) => Item::Value(v.clone()), + Item::Table(v) => Item::Table(v.clone()), + Item::ArrayOfTables(v) => Item::ArrayOfTables(v.clone()), + } + } +} + impl Default for Item { fn default() -> Self { Item::None |