Reduce unnecessary generics.
This commit is contained in:
@@ -251,7 +251,7 @@ impl Engine {
|
||||
get_builtin_binary_op_fn(operator_token.as_ref().unwrap(), operands[0], operands[1])
|
||||
{
|
||||
// Built-in found
|
||||
let context = (self, name, None, &*global, lib, pos, level + 1).into();
|
||||
let context = (self, name.as_str(), None, &*global, lib, pos, level + 1).into();
|
||||
return func(context, operands);
|
||||
}
|
||||
|
||||
|
@@ -2,9 +2,12 @@
|
||||
|
||||
use crate::types::dynamic::Variant;
|
||||
use crate::{Dynamic, Position, RhaiResultOf};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
#[cfg(feature = "no_std")]
|
||||
use std::prelude::v1::*;
|
||||
use std::{
|
||||
borrow::Borrow,
|
||||
ops::{Deref, DerefMut},
|
||||
};
|
||||
|
||||
// Calculate an offset+len pair given an actual length of the underlying array.
|
||||
//
|
||||
@@ -422,6 +425,14 @@ impl AsRef<Dynamic> for Target<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Borrow<Dynamic> for Target<'_> {
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
fn borrow(&self) -> &Dynamic {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl DerefMut for Target<'_> {
|
||||
#[inline]
|
||||
fn deref_mut(&mut self) -> &mut Dynamic {
|
||||
|
Reference in New Issue
Block a user