Skip to content

Commit

Permalink
Merge pull request #688 from epage/deprecated
Browse files Browse the repository at this point in the history
docs: Fix deprecation replacements
  • Loading branch information
epage authored Feb 16, 2024
2 parents 1dc806c + 16a97f3 commit 28d6054
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 28d6054

Please sign in to comment.