Reduce usage of as_ref and as_mut.

This commit is contained in:
Stephen Chung
2022-07-05 16:26:38 +08:00
parent 9319f87a7b
commit b6528bd51d
33 changed files with 211 additions and 137 deletions

View File

@@ -178,7 +178,7 @@ impl CallableFunction {
#[must_use]
pub fn get_iter_fn(&self) -> Option<&IteratorFn> {
match self {
Self::Iterator(f) => Some(f.as_ref()),
Self::Iterator(f) => Some(&**f),
Self::Pure(..) | Self::Method(..) | Self::Plugin(..) => None,
#[cfg(not(feature = "no_function"))]