chore: clippy fix useless_conversion

This commit is contained in:
quake 2022-07-20 21:28:17 +09:00
parent e707b66639
commit 8d91e7eb63
5 changed files with 7 additions and 8 deletions

View File

@ -365,8 +365,7 @@ impl Engine {
parse: Box::new(parse),
func: Box::new(func),
scope_may_be_changed,
}
.into(),
},
);
self
}

View File

@ -194,8 +194,8 @@ impl IntoIterator for RangeCase {
#[inline(always)]
fn into_iter(self) -> Self::IntoIter {
match self {
Self::ExclusiveInt(r, ..) => Box::new(r.into_iter()),
Self::InclusiveInt(r, ..) => Box::new(r.into_iter()),
Self::ExclusiveInt(r, ..) => Box::new(r),
Self::InclusiveInt(r, ..) => Box::new(r),
}
}
}

View File

@ -99,7 +99,7 @@ impl Engine {
let mut target: Target = value.clone().into();
// Module variables are constant
target.set_access_mode(AccessMode::ReadOnly);
return Ok((target.into(), *_var_pos));
return Ok((target, *_var_pos));
}
}

View File

@ -693,7 +693,7 @@ impl Module {
#[cfg(feature = "metadata")]
comments: Box::default(),
},
func: Into::<CallableFunction>::into(fn_def).into(),
func: fn_def.into(),
param_types: StaticVec::new_const(),
}
.into(),
@ -1029,7 +1029,7 @@ impl Module {
#[cfg(feature = "metadata")]
comments: Box::default(),
},
func: func.into(),
func,
param_types,
}
.into(),

View File

@ -1485,7 +1485,7 @@ fn get_next_token_inner(
let return_comment = return_comment || is_doc_comment(comment.as_ref().expect("`Some`"));
if return_comment {
return Some((Token::Comment(comment.expect("`Some`").into()), start_pos));
return Some((Token::Comment(comment.expect("`Some`")), start_pos));
}
if state.comment_level > 0 {
// Reached EOF without ending comment block