Skip to content

Commit 56d1a55

Browse files
committed
Deprecate unnecessary methods
We implement a bunch of traits for getting at the inner field. Also, the inner field is public. The `into_inner` and `as_inner` methods are just clutter - deprecate them.
1 parent 9d98410 commit 56d1a55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,13 @@ impl<T> Ordered<T> {
139139
/// Returns a reference to the inner object.
140140
///
141141
/// We also implement [`core::borrow::Borrow`] so this function is never explicitly needed.
142+
#[deprecate(since = "0.3.0", note = "use `ops::Deref` instead")]
142143
pub const fn as_inner(&self) -> &T { &self.0 }
143144

144145
/// Returns the inner object.
145146
///
146147
/// We also implement [`core::ops::Deref`] so this function is never explicitly needed.
148+
#[deprecate(since = "0.3.0", note = "use `ops::Deref` instead")]
147149
pub fn into_inner(self) -> T { self.0 }
148150
}
149151

0 commit comments

Comments
 (0)