summaryrefslogtreecommitdiffstats
path: root/vendor/toml_edit/src/key.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/toml_edit/src/key.rs')
-rw-r--r--vendor/toml_edit/src/key.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/vendor/toml_edit/src/key.rs b/vendor/toml_edit/src/key.rs
index b7038c36d..c1ee1655c 100644
--- a/vendor/toml_edit/src/key.rs
+++ b/vendor/toml_edit/src/key.rs
@@ -29,7 +29,7 @@ use crate::InternalString;
/// For details see [toml spec](https://github.com/toml-lang/toml/#keyvalue-pair).
///
/// To parse a key use `FromStr` trait implementation: `"string".parse::<Key>()`.
-#[derive(Debug, Clone)]
+#[derive(Debug)]
pub struct Key {
key: InternalString,
pub(crate) repr: Option<Repr>,
@@ -142,6 +142,17 @@ impl Key {
}
}
+impl Clone for Key {
+ #[inline(never)]
+ fn clone(&self) -> Self {
+ Self {
+ key: self.key.clone(),
+ repr: self.repr.clone(),
+ decor: self.decor.clone(),
+ }
+ }
+}
+
impl std::ops::Deref for Key {
type Target = str;