Reduce usage of as_ref and as_mut.
This commit is contained in:
@@ -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"))]
|
||||
|
@@ -110,7 +110,7 @@ impl<'a, M: AsRef<[&'a Module]> + ?Sized, S: AsRef<str> + 'a + ?Sized>
|
||||
Self {
|
||||
engine: value.0,
|
||||
fn_name: value.1.as_ref(),
|
||||
source: value.2.map(S::as_ref),
|
||||
source: value.2.map(<_>::as_ref),
|
||||
global: Some(value.3),
|
||||
lib: value.4.as_ref(),
|
||||
pos: value.5,
|
||||
|
@@ -131,7 +131,7 @@ impl Engine {
|
||||
lib
|
||||
} else {
|
||||
caches.push_fn_resolution_cache();
|
||||
lib_merged.push(fn_lib.as_ref());
|
||||
lib_merged.push(&**fn_lib);
|
||||
lib_merged.extend(lib.iter().cloned());
|
||||
&lib_merged
|
||||
},
|
||||
|
Reference in New Issue
Block a user