chore: Fix clippy lints in 1.40

This commit is contained in:
Mike Welsh 2019-12-19 09:10:41 -08:00
parent d1f258e71e
commit c9a5d2dbb3
3 changed files with 5 additions and 4 deletions

View File

@ -958,7 +958,7 @@ impl<'gc> Avm1<'gc> {
) -> Result<(), Error> {
self.constant_pool = GcCell::allocate(
context.gc_context,
constant_pool.iter().map(|s| s.to_string()).collect(),
constant_pool.iter().map(|s| (*s).to_string()).collect(),
);
self.current_stack_frame()
.unwrap()
@ -1786,7 +1786,7 @@ impl<'gc> Avm1<'gc> {
SwfValue::Int(v) => f64::from(*v).into(),
SwfValue::Float(v) => f64::from(*v).into(),
SwfValue::Double(v) => (*v).into(),
SwfValue::Str(v) => v.to_string().into(),
SwfValue::Str(v) => (*v).to_string().into(),
SwfValue::Register(v) => self.current_register(*v),
SwfValue::ConstantPool(i) => {
if let Some(value) = self

View File

@ -104,7 +104,7 @@ impl<'gc> Avm1Function<'gc> {
suppress_this: false,
preload_this: false,
preload_global: false,
params: params.iter().map(|s| (None, s.to_string())).collect(),
params: params.iter().map(|&s| (None, s.to_string())).collect(),
scope,
constant_pool,
}
@ -129,7 +129,7 @@ impl<'gc> Avm1Function<'gc> {
register_index: r,
} in &swf_function.params
{
owned_params.push((*r, s.to_string()))
owned_params.push((*r, (*s).to_string()))
}
Avm1Function {

View File

@ -73,6 +73,7 @@ pub fn overwrite_global<'gc>(
Ok(Value::Undefined.into())
}
#[allow(clippy::comparison_chain)]
pub fn hit_test<'gc>(
movie_clip: MovieClip<'gc>,
avm: &mut Avm1<'gc>,