chore: Run `cargo fix`

This commit is contained in:
Lord-McSweeney 2024-08-03 18:43:34 -07:00 committed by Lord-McSweeney
parent 806da319c0
commit c98c173c6b
31 changed files with 14 additions and 48 deletions

View File

@ -12,7 +12,6 @@ use gc_arena::{
lock::{Lock, RefLock}, lock::{Lock, RefLock},
Collect, Gc, GcWeak, Mutation, Collect, Gc, GcWeak, Mutation,
}; };
use std::cell::{Ref, RefMut};
/// A class instance allocator that allocates BitmapData objects. /// A class instance allocator that allocates BitmapData objects.
pub fn bitmap_data_allocator<'gc>( pub fn bitmap_data_allocator<'gc>(

View File

@ -23,7 +23,6 @@ use gc_arena::{
lock::{Lock, RefLock}, lock::{Lock, RefLock},
Collect, Gc, GcWeak, Mutation, Collect, Gc, GcWeak, Mutation,
}; };
use std::cell::{Ref, RefMut};
use std::fmt::Debug; use std::fmt::Debug;
use std::hash::{Hash, Hasher}; use std::hash::{Hash, Hasher};

View File

@ -8,7 +8,6 @@ use crate::avm2::Error;
use crate::avm2_stub_method; use crate::avm2_stub_method;
use crate::bitmap::bitmap_data::BitmapData; use crate::bitmap::bitmap_data::BitmapData;
use crate::context::RenderContext; use crate::context::RenderContext;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcCell, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcCell, GcWeak, Mutation};
use ruffle_render::backend::{ use ruffle_render::backend::{
@ -17,7 +16,7 @@ use ruffle_render::backend::{
Texture, Texture,
}; };
use ruffle_render::commands::CommandHandler; use ruffle_render::commands::CommandHandler;
use std::cell::{Cell, Ref, RefMut}; use std::cell::Cell;
use std::rc::Rc; use std::rc::Rc;
use swf::{Rectangle, Twips}; use swf::{Rectangle, Twips};

View File

@ -5,10 +5,9 @@ use crate::avm2::value::{Hint, Value};
use crate::avm2::Error; use crate::avm2::Error;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use core::fmt; use core::fmt;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use std::cell::{Cell, Ref, RefMut}; use std::cell::Cell;
/// A class instance allocator that allocates Date objects. /// A class instance allocator that allocates Date objects.
pub fn date_allocator<'gc>( pub fn date_allocator<'gc>(

View File

@ -10,7 +10,6 @@ use crate::string::AvmString;
use core::fmt; use core::fmt;
use gc_arena::barrier::unlock; use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefMut};
/// A class instance allocator that allocates Dictionary objects. /// A class instance allocator that allocates Dictionary objects.
pub fn dictionary_allocator<'gc>( pub fn dictionary_allocator<'gc>(

View File

@ -12,7 +12,6 @@ use gc_arena::{
lock::{Lock, RefLock}, lock::{Lock, RefLock},
Collect, Gc, GcWeak, Mutation, Collect, Gc, GcWeak, Mutation,
}; };
use std::cell::{Ref, RefMut};
/// A class instance allocator that allocates AppDomain objects. /// A class instance allocator that allocates AppDomain objects.
pub fn application_domain_allocator<'gc>( pub fn application_domain_allocator<'gc>(

View File

@ -8,9 +8,7 @@ use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use crate::string::WString; use crate::string::WString;
use core::fmt; use core::fmt;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefMut};
use std::fmt::Debug; use std::fmt::Debug;
use tracing::{enabled, Level}; use tracing::{enabled, Level};

View File

@ -3,10 +3,9 @@ use crate::avm2::object::{ClassObject, Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::{Activation, Error}; use crate::avm2::{Activation, Error};
use crate::backend::ui::FileDialogResult; use crate::backend::ui::FileDialogResult;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc}; use gc_arena::{lock::RefLock, Collect, Gc};
use gc_arena::{GcWeak, Mutation}; use gc_arena::{GcWeak, Mutation};
use std::cell::{Cell, Ref, RefCell, RefMut}; use std::cell::{Cell, Ref, RefCell};
use std::fmt; use std::fmt;
pub fn file_reference_allocator<'gc>( pub fn file_reference_allocator<'gc>(

View File

@ -4,9 +4,7 @@ use crate::avm2::value::Value;
use crate::avm2::{Activation, ClassObject, Error}; use crate::avm2::{Activation, ClassObject, Error};
use crate::character::Character; use crate::character::Character;
use crate::font::Font; use crate::font::Font;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefMut};
use std::fmt; use std::fmt;
/// A class instance allocator that allocates Font objects. /// A class instance allocator that allocates Font objects.

View File

@ -14,7 +14,7 @@ use gc_arena::{
lock::{Lock, RefLock}, lock::{Lock, RefLock},
Collect, Gc, GcCell, GcWeak, Mutation, Collect, Gc, GcCell, GcWeak, Mutation,
}; };
use std::cell::{Ref, RefMut}; use std::cell::Ref;
/// A class instance allocator that allocates Function objects. /// A class instance allocator that allocates Function objects.
/// This is only used when ActionScript manually calls 'new Function()', /// This is only used when ActionScript manually calls 'new Function()',

View File

@ -5,11 +5,10 @@ use crate::avm2::object::script_object::ScriptObjectData;
use crate::avm2::object::{Object, ObjectPtr, TObject}; use crate::avm2::object::{Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use ruffle_render::backend::IndexBuffer; use ruffle_render::backend::IndexBuffer;
use std::cell::{Cell, Ref, RefCell, RefMut}; use std::cell::{Cell, RefCell, RefMut};
use super::Context3DObject; use super::Context3DObject;

View File

@ -18,7 +18,7 @@ use gc_arena::{
lock::{Lock, RefLock}, lock::{Lock, RefLock},
Collect, Gc, GcWeak, Mutation, Collect, Gc, GcWeak, Mutation,
}; };
use std::cell::{Cell, Ref, RefMut}; use std::cell::{Cell, Ref};
use std::sync::Arc; use std::sync::Arc;
/// ActionScript cannot construct a LoaderInfo. Note that LoaderInfo isn't a final class. /// ActionScript cannot construct a LoaderInfo. Note that LoaderInfo isn't a final class.

View File

@ -9,9 +9,8 @@ use crate::local_connection::{LocalConnectionHandle, LocalConnections};
use crate::string::AvmString; use crate::string::AvmString;
use core::fmt; use core::fmt;
use flash_lso::types::Value as AmfValue; use flash_lso::types::Value as AmfValue;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefCell, RefMut}; use std::cell::RefCell;
/// A class instance allocator that allocates LocalConnection objects. /// A class instance allocator that allocates LocalConnection objects.
pub fn local_connection_allocator<'gc>( pub fn local_connection_allocator<'gc>(

View File

@ -13,7 +13,6 @@ use gc_arena::{
lock::{Lock, RefLock}, lock::{Lock, RefLock},
Collect, Gc, GcWeak, Mutation, Collect, Gc, GcWeak, Mutation,
}; };
use std::cell::{Ref, RefMut};
/// A class instance allocator that allocates namespace objects. /// A class instance allocator that allocates namespace objects.
pub fn namespace_allocator<'gc>( pub fn namespace_allocator<'gc>(

View File

@ -6,10 +6,9 @@ use crate::avm2::object::{ClassObject, Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use crate::net_connection::NetConnectionHandle; use crate::net_connection::NetConnectionHandle;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use std::cell::{Cell, Ref, RefMut}; use std::cell::Cell;
use std::fmt; use std::fmt;
use std::fmt::Debug; use std::fmt::Debug;

View File

@ -6,9 +6,7 @@ use crate::avm2::object::{ClassObject, Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use crate::streams::NetStream; use crate::streams::NetStream;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefMut};
use std::fmt::Debug; use std::fmt::Debug;
pub fn netstream_allocator<'gc>( pub fn netstream_allocator<'gc>(

View File

@ -5,11 +5,10 @@ use crate::avm2::object::script_object::ScriptObjectData;
use crate::avm2::object::{Object, ObjectPtr, TObject}; use crate::avm2::object::{Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use ruffle_render::backend::ShaderModule; use ruffle_render::backend::ShaderModule;
use std::cell::{Ref, RefCell, RefMut}; use std::cell::RefCell;
use std::rc::Rc; use std::rc::Rc;
use super::Context3DObject; use super::Context3DObject;

View File

@ -8,9 +8,7 @@ use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use crate::avm2::Multiname; use crate::avm2::Multiname;
use core::fmt; use core::fmt;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefMut};
/// A class instance allocator that allocates Proxy objects. /// A class instance allocator that allocates Proxy objects.
pub fn proxy_allocator<'gc>( pub fn proxy_allocator<'gc>(

View File

@ -11,7 +11,7 @@ use crate::avm2::Namespace;
use core::fmt; use core::fmt;
use gc_arena::barrier::unlock; use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefMut}; use std::cell::Ref;
/// A class instance allocator that allocates QName objects. /// A class instance allocator that allocates QName objects.
pub fn q_name_allocator<'gc>( pub fn q_name_allocator<'gc>(

View File

@ -10,7 +10,6 @@ use gc_arena::{
lock::{Lock, RefLock}, lock::{Lock, RefLock},
Collect, Gc, GcWeak, Mutation, Collect, Gc, GcWeak, Mutation,
}; };
use std::cell::{Ref, RefMut};
use std::fmt; use std::fmt;
/// A class instance allocator that allocates Responder objects. /// A class instance allocator that allocates Responder objects.

View File

@ -11,7 +11,6 @@ use crate::avm2::Multiname;
use crate::avm2::{Error, QName}; use crate::avm2::{Error, QName};
use crate::string::AvmString; use crate::string::AvmString;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefMut};
use std::fmt::Debug; use std::fmt::Debug;
/// A class instance allocator that allocates `ScriptObject`s. /// A class instance allocator that allocates `ScriptObject`s.

View File

@ -6,11 +6,10 @@ use crate::avm2::object::{ClassObject, Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use core::fmt; use core::fmt;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use ruffle_render::pixel_bender::PixelBenderShaderHandle; use ruffle_render::pixel_bender::PixelBenderShaderHandle;
use std::cell::{Cell, Ref, RefMut}; use std::cell::Cell;
/// A class instance allocator that allocates ShaderData objects. /// A class instance allocator that allocates ShaderData objects.
pub fn shader_data_allocator<'gc>( pub fn shader_data_allocator<'gc>(

View File

@ -4,10 +4,9 @@ use crate::avm2::object::{ClassObject, Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::{Activation, Error}; use crate::avm2::{Activation, Error};
use crate::socket::SocketHandle; use crate::socket::SocketHandle;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc}; use gc_arena::{lock::RefLock, Collect, Gc};
use gc_arena::{GcWeak, Mutation}; use gc_arena::{GcWeak, Mutation};
use std::cell::{Cell, Ref, RefCell, RefMut}; use std::cell::{Cell, RefCell, RefMut};
use std::fmt; use std::fmt;
/// A class instance allocator that allocates ShaderData objects. /// A class instance allocator that allocates ShaderData objects.

View File

@ -18,7 +18,6 @@ use gc_arena::{
Collect, Gc, GcWeak, Mutation, Collect, Gc, GcWeak, Mutation,
}; };
use id3::{Tag, TagLike}; use id3::{Tag, TagLike};
use std::cell::{Ref, RefMut};
use std::io::Cursor; use std::io::Cursor;
use swf::SoundInfo; use swf::SoundInfo;

View File

@ -9,9 +9,8 @@ use crate::backend::audio::SoundInstanceHandle;
use crate::context::UpdateContext; use crate::context::UpdateContext;
use crate::display_object::SoundTransform; use crate::display_object::SoundTransform;
use core::fmt; use core::fmt;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Cell, Ref, RefCell, RefMut}; use std::cell::{Cell, RefCell};
/// A class instance allocator that allocates SoundChannel objects. /// A class instance allocator that allocates SoundChannel objects.
pub fn sound_channel_allocator<'gc>( pub fn sound_channel_allocator<'gc>(

View File

@ -9,7 +9,7 @@ use core::fmt;
use gc_arena::barrier::unlock; use gc_arena::barrier::unlock;
use gc_arena::lock::{Lock, RefLock}; use gc_arena::lock::{Lock, RefLock};
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use std::cell::{Cell, Ref, RefMut}; use std::cell::Cell;
/// A class instance allocator that allocates Stage3D objects. /// A class instance allocator that allocates Stage3D objects.
pub fn stage_3d_allocator<'gc>( pub fn stage_3d_allocator<'gc>(

View File

@ -6,9 +6,7 @@ use crate::avm2::object::{ClassObject, Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use crate::display_object::DisplayObject; use crate::display_object::DisplayObject;
use gc_arena::barrier::unlock;
use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation}; use gc_arena::{lock::RefLock, Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefMut};
use std::fmt::Debug; use std::fmt::Debug;
#[derive(Clone, Collect, Copy)] #[derive(Clone, Collect, Copy)]

View File

@ -7,7 +7,6 @@ use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use crate::html::{TextDisplay, TextFormat}; use crate::html::{TextDisplay, TextFormat};
use core::fmt; use core::fmt;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use std::cell::{Ref, RefCell, RefMut}; use std::cell::{Ref, RefCell, RefMut};

View File

@ -5,11 +5,9 @@ use crate::avm2::object::script_object::ScriptObjectData;
use crate::avm2::object::{Object, ObjectPtr, TObject}; use crate::avm2::object::{Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use ruffle_render::backend::{Context3DTextureFormat, Texture}; use ruffle_render::backend::{Context3DTextureFormat, Texture};
use std::cell::{Ref, RefMut};
use std::rc::Rc; use std::rc::Rc;
use super::{ClassObject, Context3DObject}; use super::{ClassObject, Context3DObject};

View File

@ -5,11 +5,9 @@ use crate::avm2::object::script_object::ScriptObjectData;
use crate::avm2::object::{Object, ObjectPtr, TObject}; use crate::avm2::object::{Object, ObjectPtr, TObject};
use crate::avm2::value::Value; use crate::avm2::value::Value;
use crate::avm2::Error; use crate::avm2::Error;
use gc_arena::barrier::unlock;
use gc_arena::lock::RefLock; use gc_arena::lock::RefLock;
use gc_arena::{Collect, Gc, GcWeak, Mutation}; use gc_arena::{Collect, Gc, GcWeak, Mutation};
use ruffle_render::backend::VertexBuffer; use ruffle_render::backend::VertexBuffer;
use std::cell::{Ref, RefMut};
use std::rc::Rc; use std::rc::Rc;
use super::Context3DObject; use super::Context3DObject;

View File

@ -18,7 +18,6 @@ use gc_arena::{
Collect, Gc, GcWeak, Mutation, Collect, Gc, GcWeak, Mutation,
}; };
use ruffle_wstr::WString; use ruffle_wstr::WString;
use std::cell::{Ref, RefMut};
use super::xml_list_object::{E4XOrXml, XmlOrXmlListObject}; use super::xml_list_object::{E4XOrXml, XmlOrXmlListObject};
use super::PrimitiveObject; use super::PrimitiveObject;