Rename Op::unwrap to Op::into_inner

This commit is contained in:
Andreas Longva 2021-01-06 13:10:43 +01:00
parent 885480a634
commit ea6c1451b4
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ pub enum Op<T> {
impl<T> Op<T> { impl<T> Op<T> {
/// TODO /// TODO
pub fn inner_ref(&self) -> &T { pub fn inner_ref(&self) -> &T {
self.as_ref().unwrap() self.as_ref().into_inner()
} }
/// TODO /// TODO
@ -43,7 +43,7 @@ impl<T> Op<T> {
} }
/// TODO /// TODO
pub fn unwrap(self) -> T { pub fn into_inner(self) -> T {
match self { match self {
Op::NoOp(obj) | Op::Transpose(obj) => obj, Op::NoOp(obj) | Op::Transpose(obj) => obj,
} }