Skip to content

Commit

Permalink
docs: Fix deprecation replacements
Browse files Browse the repository at this point in the history
Fixes #687
  • Loading branch information
epage committed Feb 16, 2024
1 parent 1dc806c commit 16a97f3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions crates/toml_edit/src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand All @@ -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()
}
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 16a97f3

Please sign in to comment.