From 4d41297b046e9bc86c002026c7694723e09f2c23 Mon Sep 17 00:00:00 2001 From: relrelb Date: Sat, 17 Apr 2021 00:27:44 +0300 Subject: [PATCH] avm1: Remove reduntant new_ret_no_self annotation Per https://rust-lang.github.io/rust-clippy/master/#new_ret_no_self, `new_ret_no_self` applies only to functions named `new`. `TObject::create_bare_object` used to be named `new`, but was renamed in 79af3ffe44e9218204bff97d92d8d5899f4770f2. --- core/src/avm1/function.rs | 1 - core/src/avm1/object/color_transform_object.rs | 1 - core/src/avm1/object/date_object.rs | 1 - core/src/avm1/object/script_object.rs | 1 - core/src/avm1/object/shared_object.rs | 1 - core/src/avm1/object/sound_object.rs | 1 - core/src/avm1/object/stage_object.rs | 1 - core/src/avm1/object/super_object.rs | 1 - core/src/avm1/object/transform_object.rs | 1 - core/src/avm1/object/value_object.rs | 1 - core/src/avm1/object/xml_attributes_object.rs | 1 - core/src/avm1/object/xml_idmap_object.rs | 1 - core/src/avm1/object/xml_object.rs | 1 - 13 files changed, 13 deletions(-) diff --git a/core/src/avm1/function.rs b/core/src/avm1/function.rs index 1f5281a29..818c1f57a 100644 --- a/core/src/avm1/function.rs +++ b/core/src/avm1/function.rs @@ -683,7 +683,6 @@ impl<'gc> TObject<'gc> for FunctionObject<'gc> { self.base.call_setter(name, value, activation) } - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/color_transform_object.rs b/core/src/avm1/object/color_transform_object.rs index d3d80fc8e..c8d7ef356 100644 --- a/core/src/avm1/object/color_transform_object.rs +++ b/core/src/avm1/object/color_transform_object.rs @@ -115,7 +115,6 @@ impl<'gc> TObject<'gc> for ColorTransformObject<'gc> { Some(*self) } - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/date_object.rs b/core/src/avm1/object/date_object.rs index 0f29b4c11..d4bd3c22c 100644 --- a/core/src/avm1/object/date_object.rs +++ b/core/src/avm1/object/date_object.rs @@ -61,7 +61,6 @@ impl<'gc> DateObject<'gc> { impl<'gc> TObject<'gc> for DateObject<'gc> { impl_custom_object!(base); - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/script_object.rs b/core/src/avm1/object/script_object.rs index c53a5e74f..2beb3892a 100644 --- a/core/src/avm1/object/script_object.rs +++ b/core/src/avm1/object/script_object.rs @@ -473,7 +473,6 @@ impl<'gc> TObject<'gc> for ScriptObject<'gc> { } } - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/shared_object.rs b/core/src/avm1/object/shared_object.rs index 2be753a1c..7f2f1c760 100644 --- a/core/src/avm1/object/shared_object.rs +++ b/core/src/avm1/object/shared_object.rs @@ -62,7 +62,6 @@ impl<'gc> SharedObject<'gc> { impl<'gc> TObject<'gc> for SharedObject<'gc> { impl_custom_object!(base); - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/sound_object.rs b/core/src/avm1/object/sound_object.rs index a9b441a67..cd9e263e8 100644 --- a/core/src/avm1/object/sound_object.rs +++ b/core/src/avm1/object/sound_object.rs @@ -122,7 +122,6 @@ impl<'gc> SoundObject<'gc> { impl<'gc> TObject<'gc> for SoundObject<'gc> { impl_custom_object!(base); - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/stage_object.rs b/core/src/avm1/object/stage_object.rs index 90635dabb..9871d9fa0 100644 --- a/core/src/avm1/object/stage_object.rs +++ b/core/src/avm1/object/stage_object.rs @@ -279,7 +279,6 @@ impl<'gc> TObject<'gc> for StageObject<'gc> { self.0.read().base.call_setter(name, value, activation) } - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/super_object.rs b/core/src/avm1/object/super_object.rs index f18c1a6c0..38f9296fb 100644 --- a/core/src/avm1/object/super_object.rs +++ b/core/src/avm1/object/super_object.rs @@ -140,7 +140,6 @@ impl<'gc> TObject<'gc> for SuperObject<'gc> { self.0.read().child.call_setter(name, value, activation) } - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/transform_object.rs b/core/src/avm1/object/transform_object.rs index 494ca2ce2..64a111ad2 100644 --- a/core/src/avm1/object/transform_object.rs +++ b/core/src/avm1/object/transform_object.rs @@ -83,7 +83,6 @@ impl<'gc> TObject<'gc> for TransformObject<'gc> { Ok(this.into()) } - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/value_object.rs b/core/src/avm1/object/value_object.rs index c252d0e88..539789338 100644 --- a/core/src/avm1/object/value_object.rs +++ b/core/src/avm1/object/value_object.rs @@ -118,7 +118,6 @@ impl fmt::Debug for ValueObject<'_> { impl<'gc> TObject<'gc> for ValueObject<'gc> { impl_custom_object!(base); - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/xml_attributes_object.rs b/core/src/avm1/object/xml_attributes_object.rs index 3fec55b94..ce714a151 100644 --- a/core/src/avm1/object/xml_attributes_object.rs +++ b/core/src/avm1/object/xml_attributes_object.rs @@ -102,7 +102,6 @@ impl<'gc> TObject<'gc> for XmlAttributesObject<'gc> { self.base().call_setter(name, value, activation) } - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/xml_idmap_object.rs b/core/src/avm1/object/xml_idmap_object.rs index 7c11d4fd0..34388f74b 100644 --- a/core/src/avm1/object/xml_idmap_object.rs +++ b/core/src/avm1/object/xml_idmap_object.rs @@ -102,7 +102,6 @@ impl<'gc> TObject<'gc> for XmlIdMapObject<'gc> { self.base().call_setter(name, value, activation) } - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>, diff --git a/core/src/avm1/object/xml_object.rs b/core/src/avm1/object/xml_object.rs index 7b40d4ad7..5ca1413d9 100644 --- a/core/src/avm1/object/xml_object.rs +++ b/core/src/avm1/object/xml_object.rs @@ -74,7 +74,6 @@ impl fmt::Debug for XmlObject<'_> { impl<'gc> TObject<'gc> for XmlObject<'gc> { impl_custom_object!(base); - #[allow(clippy::new_ret_no_self)] fn create_bare_object( &self, activation: &mut Activation<'_, 'gc, '_>,