Satisfy clippy.

This commit is contained in:
Stephen Chung
2021-07-24 14:11:16 +08:00
parent b8485b1909
commit df482d3574
32 changed files with 226 additions and 367 deletions

View File

@@ -19,7 +19,6 @@ pub struct FnPtr(Identifier, StaticVec<Dynamic>);
impl FnPtr {
/// Create a new function pointer.
#[inline(always)]
#[must_use]
pub fn new(name: impl Into<Identifier>) -> Result<Self, Box<EvalAltResult>> {
name.into().try_into()
}
@@ -27,7 +26,7 @@ impl FnPtr {
#[inline(always)]
#[must_use]
pub(crate) fn new_unchecked(name: Identifier, curry: StaticVec<Dynamic>) -> Self {
Self(name.into(), curry)
Self(name, curry)
}
/// Get the name of the function.
#[inline(always)]
@@ -97,7 +96,6 @@ impl FnPtr {
/// Do not use the arguments after this call. If they are needed afterwards,
/// clone them _before_ calling this function.
#[inline]
#[must_use]
pub fn call_dynamic(
&self,
ctx: &NativeCallContext,