diff --git a/core/src/avm2/globals/array.rs b/core/src/avm2/globals/array.rs index a850b0b03..ea127f167 100644 --- a/core/src/avm2/globals/array.rs +++ b/core/src/avm2/globals/array.rs @@ -1229,21 +1229,18 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("toString", to_string), ("toLocaleString", to_locale_string), ("valueOf", value_of), ]; write.define_public_builtin_instance_methods(PUBLIC_INSTANCE_METHODS); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[("length", Some(length), Some(set_length))]; + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = + &[("length", Some(length), Some(set_length))]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const AS3_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const AS3_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("concat", concat), ("join", join), ("forEach", for_each), @@ -1265,7 +1262,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_as3_builtin_instance_methods(AS3_INSTANCE_METHODS); - const CONSTANTS: &[(&'static str, u32)] = &[ + const CONSTANTS: &[(&str, u32)] = &[ ( "CASEINSENSITIVE", SortOptions::CASE_INSENSITIVE.bits() as u32, diff --git a/core/src/avm2/globals/flash/display/actionscriptversion.rs b/core/src/avm2/globals/flash/display/actionscriptversion.rs index c27fae571..c89c2280a 100644 --- a/core/src/avm2/globals/flash/display/actionscriptversion.rs +++ b/core/src/avm2/globals/flash/display/actionscriptversion.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::FINAL | ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, u32)] = &[("ACTIONSCRIPT2", 2), ("ACTIONSCRIPT3", 3)]; + const CONSTANTS: &[(&str, u32)] = &[("ACTIONSCRIPT2", 2), ("ACTIONSCRIPT3", 3)]; write.define_public_constant_uint_class_traits(CONSTANTS); class diff --git a/core/src/avm2/globals/flash/display/capsstyle.rs b/core/src/avm2/globals/flash/display/capsstyle.rs index 87fad26d7..04644439c 100644 --- a/core/src/avm2/globals/flash/display/capsstyle.rs +++ b/core/src/avm2/globals/flash/display/capsstyle.rs @@ -44,7 +44,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); write.set_attributes(ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, &'static str)] = + const CONSTANTS: &[(&str, &str)] = &[("NONE", "none"), ("ROUND", "round"), ("SQUARE", "square")]; write.define_public_constant_string_class_traits(CONSTANTS); diff --git a/core/src/avm2/globals/flash/display/displayobject.rs b/core/src/avm2/globals/flash/display/displayobject.rs index 7bc99060e..271c760a4 100644 --- a/core/src/avm2/globals/flash/display/displayobject.rs +++ b/core/src/avm2/globals/flash/display/displayobject.rs @@ -597,11 +597,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("alpha", Some(alpha), Some(set_alpha)), ("height", Some(height), Some(set_height)), ("scaleY", Some(scale_y), Some(set_scale_y)), @@ -621,7 +617,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("hitTestPoint", hit_test_point), ("hitTestObject", hit_test_object), ]; diff --git a/core/src/avm2/globals/flash/display/displayobjectcontainer.rs b/core/src/avm2/globals/flash/display/displayobjectcontainer.rs index f5d39e8f0..5b3a815e6 100644 --- a/core/src/avm2/globals/flash/display/displayobjectcontainer.rs +++ b/core/src/avm2/globals/flash/display/displayobjectcontainer.rs @@ -585,14 +585,11 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[("numChildren", Some(num_children), None)]; + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = + &[("numChildren", Some(num_children), None)]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("getChildAt", get_child_at), ("getChildByName", get_child_by_name), ("addChild", add_child), diff --git a/core/src/avm2/globals/flash/display/framelabel.rs b/core/src/avm2/globals/flash/display/framelabel.rs index c0197eaa7..f4feb2943 100644 --- a/core/src/avm2/globals/flash/display/framelabel.rs +++ b/core/src/avm2/globals/flash/display/framelabel.rs @@ -101,11 +101,8 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[("name", Some(name), None), ("frame", Some(frame), None)]; + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = + &[("name", Some(name), None), ("frame", Some(frame), None)]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); class diff --git a/core/src/avm2/globals/flash/display/graphics.rs b/core/src/avm2/globals/flash/display/graphics.rs index b057f4790..42f7448a4 100644 --- a/core/src/avm2/globals/flash/display/graphics.rs +++ b/core/src/avm2/globals/flash/display/graphics.rs @@ -365,7 +365,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("beginFill", begin_fill), ("clear", clear), ("curveTo", curve_to), diff --git a/core/src/avm2/globals/flash/display/jointstyle.rs b/core/src/avm2/globals/flash/display/jointstyle.rs index 7ad6832aa..029a4fde2 100644 --- a/core/src/avm2/globals/flash/display/jointstyle.rs +++ b/core/src/avm2/globals/flash/display/jointstyle.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, &'static str)] = + const CONSTANTS: &[(&str, &str)] = &[("BEVEL", "bevel"), ("MITER", "miter"), ("ROUND", "round")]; write.define_public_constant_string_class_traits(CONSTANTS); diff --git a/core/src/avm2/globals/flash/display/linescalemode.rs b/core/src/avm2/globals/flash/display/linescalemode.rs index 818d88ca4..b9a1b30ec 100644 --- a/core/src/avm2/globals/flash/display/linescalemode.rs +++ b/core/src/avm2/globals/flash/display/linescalemode.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("HORIZONTAL", "horizontal"), ("NONE", "none"), ("NORMAL", "normal"), diff --git a/core/src/avm2/globals/flash/display/loaderinfo.rs b/core/src/avm2/globals/flash/display/loaderinfo.rs index e62d4b0e2..c20bb649d 100644 --- a/core/src/avm2/globals/flash/display/loaderinfo.rs +++ b/core/src/avm2/globals/flash/display/loaderinfo.rs @@ -433,11 +433,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("actionScriptVersion", Some(action_script_version), None), ("applicationDomain", Some(application_domain), None), ("bytesLoaded", Some(bytes_total), None), diff --git a/core/src/avm2/globals/flash/display/movieclip.rs b/core/src/avm2/globals/flash/display/movieclip.rs index 50c977adb..ccd606b44 100644 --- a/core/src/avm2/globals/flash/display/movieclip.rs +++ b/core/src/avm2/globals/flash/display/movieclip.rs @@ -546,11 +546,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("currentFrame", Some(current_frame), None), ("currentFrameLabel", Some(current_frame_label), None), ("currentLabel", Some(current_label), None), @@ -563,7 +559,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("addFrameScript", add_frame_script), ("gotoAndPlay", goto_and_play), ("gotoAndStop", goto_and_stop), diff --git a/core/src/avm2/globals/flash/display/scene.rs b/core/src/avm2/globals/flash/display/scene.rs index 80c0268b1..cd53bd138 100644 --- a/core/src/avm2/globals/flash/display/scene.rs +++ b/core/src/avm2/globals/flash/display/scene.rs @@ -125,11 +125,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("labels", Some(labels), None), ("name", Some(name), None), ("numFrames", Some(num_frames), None), diff --git a/core/src/avm2/globals/flash/display/shape.rs b/core/src/avm2/globals/flash/display/shape.rs index d75f600fb..380b3f149 100644 --- a/core/src/avm2/globals/flash/display/shape.rs +++ b/core/src/avm2/globals/flash/display/shape.rs @@ -97,11 +97,8 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[("graphics", Some(graphics), None)]; + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = + &[("graphics", Some(graphics), None)]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); // Slot for lazy-initialized Graphics object. diff --git a/core/src/avm2/globals/flash/display/sprite.rs b/core/src/avm2/globals/flash/display/sprite.rs index c54ff9716..e93981d65 100644 --- a/core/src/avm2/globals/flash/display/sprite.rs +++ b/core/src/avm2/globals/flash/display/sprite.rs @@ -91,11 +91,8 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[("graphics", Some(graphics), None)]; + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = + &[("graphics", Some(graphics), None)]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); // Slot for lazy-initialized Graphics object. diff --git a/core/src/avm2/globals/flash/display/stage.rs b/core/src/avm2/globals/flash/display/stage.rs index eda1ce7ea..94ea13ebf 100644 --- a/core/src/avm2/globals/flash/display/stage.rs +++ b/core/src/avm2/globals/flash/display/stage.rs @@ -615,7 +615,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); const PUBLIC_OVERRIDE_INSTANCE_PROPERTIES: &[( - &'static str, + &str, Option, Option, )] = &[ @@ -668,11 +668,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> } } - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("align", Some(align), Some(set_align)), ("browserZoomFactor", Some(browser_zoom_factor), None), ("color", Some(color), Some(set_color)), diff --git a/core/src/avm2/globals/flash/display/stagealign.rs b/core/src/avm2/globals/flash/display/stagealign.rs index f83bf626e..9e30b0149 100644 --- a/core/src/avm2/globals/flash/display/stagealign.rs +++ b/core/src/avm2/globals/flash/display/stagealign.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED | ClassAttributes::FINAL); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("BOTTOM", "B"), ("BOTTOM_LEFT", "BL"), ("BOTTOM_RIGHT", "BR"), diff --git a/core/src/avm2/globals/flash/display/stagedisplaystate.rs b/core/src/avm2/globals/flash/display/stagedisplaystate.rs index 65f9554a5..83956a576 100644 --- a/core/src/avm2/globals/flash/display/stagedisplaystate.rs +++ b/core/src/avm2/globals/flash/display/stagedisplaystate.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED | ClassAttributes::FINAL); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("FULL_SCREEN", "fullScreen"), ("FULL_SCREEN_INTERACTIVE", "fullScreenInteractive"), ("NORMAL", "normal"), diff --git a/core/src/avm2/globals/flash/display/stagequality.rs b/core/src/avm2/globals/flash/display/stagequality.rs index 77e5d0ed3..2530318d9 100644 --- a/core/src/avm2/globals/flash/display/stagequality.rs +++ b/core/src/avm2/globals/flash/display/stagequality.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED | ClassAttributes::FINAL); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("BEST", "best"), ("HIGH", "high"), ("HIGH_16X16", "16x16"), diff --git a/core/src/avm2/globals/flash/display/stagescalemode.rs b/core/src/avm2/globals/flash/display/stagescalemode.rs index 4934a12fb..abc9bffb9 100644 --- a/core/src/avm2/globals/flash/display/stagescalemode.rs +++ b/core/src/avm2/globals/flash/display/stagescalemode.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED | ClassAttributes::FINAL); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("EXACT_FIT", "exactFit"), ("NO_BORDER", "noBorder"), ("NO_SCALE", "noScale"), diff --git a/core/src/avm2/globals/flash/display/swfversion.rs b/core/src/avm2/globals/flash/display/swfversion.rs index c6180e71e..acbb4d589 100644 --- a/core/src/avm2/globals/flash/display/swfversion.rs +++ b/core/src/avm2/globals/flash/display/swfversion.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::FINAL | ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, u32)] = &[ + const CONSTANTS: &[(&str, u32)] = &[ ("FLASH1", 1), ("FLASH2", 2), ("FLASH3", 3), diff --git a/core/src/avm2/globals/flash/events/event.rs b/core/src/avm2/globals/flash/events/event.rs index b553ee1e8..b7d363714 100644 --- a/core/src/avm2/globals/flash/events/event.rs +++ b/core/src/avm2/globals/flash/events/event.rs @@ -273,11 +273,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("bubbles", Some(bubbles), None), ("cancelable", Some(cancelable), None), ("type", Some(get_type), None), @@ -287,7 +283,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("clone", clone), ("formatToString", format_to_string), ("isDefaultPrevented", is_default_prevented), @@ -298,7 +294,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_builtin_instance_methods(PUBLIC_INSTANCE_METHODS); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("ACTIVATE", "activate"), ("ADDED", "added"), ("ADDED_TO_STAGE", "addedToStage"), diff --git a/core/src/avm2/globals/flash/events/eventdispatcher.rs b/core/src/avm2/globals/flash/events/eventdispatcher.rs index 2de0c3a88..5a74d4531 100644 --- a/core/src/avm2/globals/flash/events/eventdispatcher.rs +++ b/core/src/avm2/globals/flash/events/eventdispatcher.rs @@ -253,7 +253,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.implements(QName::new(Namespace::package("flash.events"), "IEventDispatcher").into()); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("addEventListener", add_event_listener), ("removeEventListener", remove_event_listener), ("hasEventListener", has_event_listener), diff --git a/core/src/avm2/globals/flash/events/ieventdispatcher.rs b/core/src/avm2/globals/flash/events/ieventdispatcher.rs index 99cd1e91d..19db3e7a6 100644 --- a/core/src/avm2/globals/flash/events/ieventdispatcher.rs +++ b/core/src/avm2/globals/flash/events/ieventdispatcher.rs @@ -41,7 +41,7 @@ pub fn create_interface<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class< write.set_attributes(ClassAttributes::INTERFACE); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("addEventListener", bodiless_method), ("dispatchEvent", bodiless_method), ("hasEventListener", bodiless_method), diff --git a/core/src/avm2/globals/flash/geom/point.rs b/core/src/avm2/globals/flash/geom/point.rs index 4907a270b..73d0f5c56 100644 --- a/core/src/avm2/globals/flash/geom/point.rs +++ b/core/src/avm2/globals/flash/geom/point.rs @@ -341,21 +341,18 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); write.set_attributes(ClassAttributes::SEALED); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[("length", Some(length), None)]; + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = + &[("length", Some(length), None)]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const PUBLIC_CLASS_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_CLASS_METHODS: &[(&str, NativeMethod)] = &[ ("distance", distance), ("interpolate", interpolate), ("polar", polar), ]; write.define_public_builtin_class_methods(PUBLIC_CLASS_METHODS); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("add", add), ("clone", clone), ("copyFrom", copy_from), diff --git a/core/src/avm2/globals/flash/system/application_domain.rs b/core/src/avm2/globals/flash/system/application_domain.rs index 874ccb7c3..e8fa0f112 100644 --- a/core/src/avm2/globals/flash/system/application_domain.rs +++ b/core/src/avm2/globals/flash/system/application_domain.rs @@ -160,7 +160,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_CLASS_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_CLASS_METHODS: &[(&str, NativeMethod)] = &[ ("currentDomain", current_domain), ("parentDomain", parent_domain), ("getDefinition", get_definition), @@ -168,11 +168,8 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_builtin_class_methods(PUBLIC_CLASS_METHODS); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[("domainMemory", Some(domain_memory), Some(set_domain_memory))]; + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = + &[("domainMemory", Some(domain_memory), Some(set_domain_memory))]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); class diff --git a/core/src/avm2/globals/flash/system/system.rs b/core/src/avm2/globals/flash/system/system.rs index 64c17b2ae..b9e0c877c 100644 --- a/core/src/avm2/globals/flash/system/system.rs +++ b/core/src/avm2/globals/flash/system/system.rs @@ -52,7 +52,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_CLASS_METHODS: &[(&'static str, NativeMethod)] = &[("gc", gc)]; + const PUBLIC_CLASS_METHODS: &[(&str, NativeMethod)] = &[("gc", gc)]; write.define_public_builtin_class_methods(PUBLIC_CLASS_METHODS); class diff --git a/core/src/avm2/globals/flash/text/textfield.rs b/core/src/avm2/globals/flash/text/textfield.rs index a9b57b131..7b1e0b0b6 100644 --- a/core/src/avm2/globals/flash/text/textfield.rs +++ b/core/src/avm2/globals/flash/text/textfield.rs @@ -865,11 +865,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("autoSize", Some(autosize), Some(set_autosize)), ( "backgroundColor", @@ -902,7 +898,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("appendText", append_text), ("getTextFormat", get_text_format), ("replaceSelectedText", replace_selected_text), diff --git a/core/src/avm2/globals/flash/text/textfieldautosize.rs b/core/src/avm2/globals/flash/text/textfieldautosize.rs index de1937042..09d2c2c0b 100644 --- a/core/src/avm2/globals/flash/text/textfieldautosize.rs +++ b/core/src/avm2/globals/flash/text/textfieldautosize.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::FINAL | ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("CENTER", "center"), ("LEFT", "left"), ("NONE", "none"), diff --git a/core/src/avm2/globals/flash/text/textfieldtype.rs b/core/src/avm2/globals/flash/text/textfieldtype.rs index 723aeadaf..faf09e374 100644 --- a/core/src/avm2/globals/flash/text/textfieldtype.rs +++ b/core/src/avm2/globals/flash/text/textfieldtype.rs @@ -45,8 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::FINAL | ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, &'static str)] = - &[("DYNAMIC", "dynamic"), ("INPUT", "input")]; + const CONSTANTS: &[(&str, &str)] = &[("DYNAMIC", "dynamic"), ("INPUT", "input")]; write.define_public_constant_string_class_traits(CONSTANTS); class diff --git a/core/src/avm2/globals/flash/text/textformat.rs b/core/src/avm2/globals/flash/text/textformat.rs index cc2eea37d..e56838ba1 100644 --- a/core/src/avm2/globals/flash/text/textformat.rs +++ b/core/src/avm2/globals/flash/text/textformat.rs @@ -125,7 +125,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const ITEMS: &[(&'static str, &'static str)] = &[ + const ITEMS: &[(&str, &str)] = &[ ("align", "String"), ("blockIndent", "Object"), ("bold", "Object"), diff --git a/core/src/avm2/globals/flash/text/textformatalign.rs b/core/src/avm2/globals/flash/text/textformatalign.rs index d3652cec6..6d808fdbe 100644 --- a/core/src/avm2/globals/flash/text/textformatalign.rs +++ b/core/src/avm2/globals/flash/text/textformatalign.rs @@ -45,7 +45,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::FINAL | ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("CENTER", "center"), ("END", "end"), ("JUSTIFY", "justify"), diff --git a/core/src/avm2/globals/flash/utils/bytearray.rs b/core/src/avm2/globals/flash/utils/bytearray.rs index d08706df3..abe3d1ffd 100644 --- a/core/src/avm2/globals/flash/utils/bytearray.rs +++ b/core/src/avm2/globals/flash/utils/bytearray.rs @@ -743,7 +743,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::SEALED); - const PUBLIC_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[ ("writeByte", write_byte), ("writeBytes", write_bytes), ("readBytes", read_bytes), @@ -777,11 +777,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_builtin_instance_methods(PUBLIC_INSTANCE_METHODS); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("bytesAvailable", Some(bytes_available), None), ("length", Some(length), Some(set_length)), ("position", Some(position), Some(set_position)), diff --git a/core/src/avm2/globals/flash/utils/endian.rs b/core/src/avm2/globals/flash/utils/endian.rs index 09997332f..85f55aa3c 100644 --- a/core/src/avm2/globals/flash/utils/endian.rs +++ b/core/src/avm2/globals/flash/utils/endian.rs @@ -38,7 +38,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::FINAL | ClassAttributes::SEALED); - const CONSTANTS: &[(&'static str, &'static str)] = &[ + const CONSTANTS: &[(&str, &str)] = &[ ("LITTLE_ENDIAN", "littleEndian"), ("BIG_ENDIAN", "bigEndian"), ]; diff --git a/core/src/avm2/globals/math.rs b/core/src/avm2/globals/math.rs index bd64b028d..9dabcfd3d 100644 --- a/core/src/avm2/globals/math.rs +++ b/core/src/avm2/globals/math.rs @@ -55,7 +55,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> write.set_attributes(ClassAttributes::FINAL | ClassAttributes::SEALED); use std::f64::consts::*; - const CONSTANTS: &[(&'static str, f64)] = &[ + const CONSTANTS: &[(&str, f64)] = &[ ("E", E), ("LN10", LN_10), ("LN2", LN_2), @@ -67,7 +67,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_constant_number_class_traits(CONSTANTS); - const PUBLIC_CLASS_METHODS: &[(&'static str, NativeMethod)] = &[ + const PUBLIC_CLASS_METHODS: &[(&str, NativeMethod)] = &[ ("atan2", atan2), ("max", max), ("min", min), diff --git a/core/src/avm2/globals/regexp.rs b/core/src/avm2/globals/regexp.rs index 3c5b01033..b10045194 100644 --- a/core/src/avm2/globals/regexp.rs +++ b/core/src/avm2/globals/regexp.rs @@ -274,11 +274,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[ + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = &[ ("dotall", Some(dotall), None), ("extended", Some(extended), None), ("global", Some(global), None), @@ -289,7 +285,7 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> ]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const AS3_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = &[("exec", exec), ("test", test)]; + const AS3_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[("exec", exec), ("test", test)]; write.define_as3_builtin_instance_methods(AS3_INSTANCE_METHODS); class diff --git a/core/src/avm2/globals/string.rs b/core/src/avm2/globals/string.rs index 4e34e57d1..6db92861b 100644 --- a/core/src/avm2/globals/string.rs +++ b/core/src/avm2/globals/string.rs @@ -129,14 +129,11 @@ pub fn create_class<'gc>(mc: MutationContext<'gc, '_>) -> GcCell<'gc, Class<'gc> let mut write = class.write(mc); write.set_attributes(ClassAttributes::FINAL | ClassAttributes::SEALED); - const PUBLIC_INSTANCE_PROPERTIES: &[( - &'static str, - Option, - Option, - )] = &[("length", Some(length), None)]; + const PUBLIC_INSTANCE_PROPERTIES: &[(&str, Option, Option)] = + &[("length", Some(length), None)]; write.define_public_builtin_instance_properties(PUBLIC_INSTANCE_PROPERTIES); - const AS3_INSTANCE_METHODS: &[(&'static str, NativeMethod)] = + const AS3_INSTANCE_METHODS: &[(&str, NativeMethod)] = &[("charAt", char_at), ("charCodeAt", char_code_at)]; write.define_as3_builtin_instance_methods(AS3_INSTANCE_METHODS);