File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,18 @@ impl<T> Ordered<T> {
135
135
/// This allows: `let found = map.get(Ordered::from_ref(&a));`
136
136
#[ allow( clippy:: ptr_as_ptr) ]
137
137
pub fn from_ref ( value : & T ) -> & Self { unsafe { & * ( value as * const _ as * const Self ) } }
138
+
139
+ /// Returns a reference to the inner object.
140
+ ///
141
+ /// We also implement [`core::borrow::Borrow`] so this function is never explicitly needed.
142
+ #[ deprecated( since = "0.3.0" , note = "use `ops::Deref` instead" ) ]
143
+ pub const fn as_inner ( & self ) -> & T { & self . 0 }
144
+
145
+ /// Returns the inner object.
146
+ ///
147
+ /// We also implement [`core::ops::Deref`] so this function is never explicitly needed.
148
+ #[ deprecated( since = "0.3.0" , note = "use `ops::Deref` instead" ) ]
149
+ pub fn into_inner ( self ) -> T { self . 0 }
138
150
}
139
151
140
152
impl < T : ArbitraryOrd > ArbitraryOrd for & T {
You can’t perform that action at this time.
0 commit comments