From 16a97f3c91f450ba09233f68639459e74cb30036 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 15 Feb 2024 19:31:32 -0600 Subject: [PATCH] docs: Fix deprecation replacements Fixes #687 --- crates/toml_edit/src/key.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/crates/toml_edit/src/key.rs b/crates/toml_edit/src/key.rs index 8ae2dd13..f531890e 100644 --- a/crates/toml_edit/src/key.rs +++ b/crates/toml_edit/src/key.rs @@ -113,7 +113,10 @@ impl Key { } /// Returns the surrounding whitespace - #[deprecated(since = "0.21.1", note = "Replaced with `decor_mut`")] + #[deprecated( + since = "0.21.1", + note = "Replaced with `dotted_decor_mut`, `leaf_decor_mut" + )] pub fn decor_mut(&mut self) -> &mut Decor { self.leaf_decor_mut() } @@ -129,7 +132,7 @@ impl Key { } /// Returns the surrounding whitespace - #[deprecated(since = "0.21.1", note = "Replaced with `decor`")] + #[deprecated(since = "0.21.1", note = "Replaced with `dotted_decor`, `leaf_decor")] pub fn decor(&self) -> &Decor { self.leaf_decor() } @@ -360,7 +363,10 @@ impl<'k> KeyMut<'k> { } /// Returns the surrounding whitespace - #[deprecated(since = "0.21.1", note = "Replaced with `decor_mut`")] + #[deprecated( + since = "0.21.1", + note = "Replaced with `dotted_decor_mut`, `leaf_decor_mut" + )] pub fn decor_mut(&mut self) -> &mut Decor { #![allow(deprecated)] self.key.decor_mut() @@ -377,7 +383,7 @@ impl<'k> KeyMut<'k> { } /// Returns the surrounding whitespace - #[deprecated(since = "0.21.1", note = "Replaced with `decor`")] + #[deprecated(since = "0.21.1", note = "Replaced with `dotted_decor`, `leaf_decor")] pub fn decor(&self) -> &Decor { #![allow(deprecated)] self.key.decor()