mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update rustfmt to the 2024 style edition (#35764)
* Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
6300e820b4
commit
3d320fa96a
603 changed files with 1739 additions and 1648 deletions
|
@ -10,7 +10,7 @@ pub(crate) mod base {
|
|||
pub(crate) use js::error::throw_type_error;
|
||||
pub(crate) use js::jsapi::{
|
||||
CurrentGlobalOrNull, HandleValue as RawHandleValue, HandleValueArray, Heap, IsCallable,
|
||||
JSContext, JSObject, JS_NewObject,
|
||||
JS_NewObject, JSContext, JSObject,
|
||||
};
|
||||
pub(crate) use js::jsval::{JSVal, NullValue, ObjectOrNullValue, ObjectValue, UndefinedValue};
|
||||
pub(crate) use js::panic::maybe_resume_unwind;
|
||||
|
@ -18,8 +18,8 @@ pub(crate) mod base {
|
|||
pub(crate) use js::rust::{HandleObject, HandleValue, MutableHandleObject, MutableHandleValue};
|
||||
|
||||
pub(crate) use crate::dom::bindings::callback::{
|
||||
wrap_call_this_value, CallSetup, CallbackContainer, CallbackFunction, CallbackInterface,
|
||||
CallbackObject, ExceptionHandling, ThisReflector,
|
||||
CallSetup, CallbackContainer, CallbackFunction, CallbackInterface, CallbackObject,
|
||||
ExceptionHandling, ThisReflector, wrap_call_this_value,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{
|
||||
ChannelCountMode, ChannelCountModeValues, ChannelInterpretation,
|
||||
|
@ -28,11 +28,11 @@ pub(crate) mod base {
|
|||
pub(crate) use crate::dom::bindings::codegen::DomTypes::DomTypes;
|
||||
pub(crate) use crate::dom::bindings::codegen::{GenericUnionTypes, UnionTypes};
|
||||
pub(crate) use crate::dom::bindings::conversions::{
|
||||
root_from_handlevalue, ConversionBehavior, ConversionResult, FromJSValConvertible,
|
||||
StringificationBehavior, ToJSValConvertible,
|
||||
ConversionBehavior, ConversionResult, FromJSValConvertible, StringificationBehavior,
|
||||
ToJSValConvertible, root_from_handlevalue,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::error::Error::JSFailed;
|
||||
pub(crate) use crate::dom::bindings::error::{throw_dom_exception, Fallible};
|
||||
pub(crate) use crate::dom::bindings::error::{Fallible, throw_dom_exception};
|
||||
pub(crate) use crate::dom::bindings::num::Finite;
|
||||
pub(crate) use crate::dom::bindings::proxyhandler::CrossOriginProperties;
|
||||
pub(crate) use crate::dom::bindings::reflector::{DomGlobalGeneric, DomObject};
|
||||
|
@ -40,7 +40,7 @@ pub(crate) mod base {
|
|||
pub(crate) use crate::dom::bindings::str::{ByteString, DOMString, USVString};
|
||||
pub(crate) use crate::dom::bindings::trace::RootedTraceableBox;
|
||||
pub(crate) use crate::dom::bindings::utils::{
|
||||
get_dictionary_property, set_dictionary_property, DomHelpers, ThreadUnsafeOnceLock,
|
||||
DomHelpers, ThreadUnsafeOnceLock, get_dictionary_property, set_dictionary_property,
|
||||
};
|
||||
pub(crate) use crate::dom::globalscope::{GlobalScope, GlobalScopeHelpers};
|
||||
pub(crate) use crate::dom::promise::PromiseHelpers;
|
||||
|
@ -58,44 +58,45 @@ pub(crate) mod module {
|
|||
SetProxyReservedSlot,
|
||||
};
|
||||
pub(crate) use js::jsapi::{
|
||||
JSJitInfo_OpType, JSJitInfo__bindgen_ty_1, JSJitInfo__bindgen_ty_2,
|
||||
JSJitInfo__bindgen_ty_3, JSJitMethodCallArgs, JSJitSetterCallArgs, JSNativeWrapper,
|
||||
JSPropertySpec, JSPropertySpec_Accessor, JSPropertySpec_AccessorsOrValue,
|
||||
JSPropertySpec_AccessorsOrValue_Accessors, JSPropertySpec_Kind, JSPropertySpec_Name,
|
||||
JSPropertySpec_ValueWrapper, JSPropertySpec_ValueWrapper_Type,
|
||||
JSPropertySpec_ValueWrapper__bindgen_ty_1, JSTracer, JSTypedMethodJitInfo, JSValueType,
|
||||
JS_AtomizeAndPinString, JS_ForwardGetPropertyTo, JS_GetPropertyDescriptorById,
|
||||
JS_HasPropertyById, JS_NewPlainObject, JS_SetReservedSlot,
|
||||
MutableHandle as RawMutableHandle, MutableHandleIdVector as RawMutableHandleIdVector,
|
||||
MutableHandleObject as RawMutableHandleObject, MutableHandleValue as RawMutableHandleValue,
|
||||
ObjectOpResult, PropertyDescriptor, SymbolCode, UndefinedHandleValue,
|
||||
__BindgenBitfieldUnit, jsid, CallArgs, GCContext, GetRealmErrorPrototype,
|
||||
__BindgenBitfieldUnit, CallArgs, GCContext, GetRealmErrorPrototype,
|
||||
GetRealmFunctionPrototype, GetRealmIteratorPrototype, GetRealmObjectPrototype,
|
||||
GetWellKnownSymbol, Handle as RawHandle, HandleId as RawHandleId,
|
||||
HandleObject as RawHandleObject, JSAutoRealm, JSClass, JSClassOps, JSFunctionSpec,
|
||||
JSJitGetterCallArgs, JSJitInfo, JSJitInfo_AliasSet, JSJitInfo_ArgType,
|
||||
JSCLASS_FOREGROUND_FINALIZE, JSCLASS_RESERVED_SLOTS_SHIFT, JSITER_HIDDEN, JSITER_OWNONLY,
|
||||
JSITER_SYMBOLS, JSPROP_ENUMERATE, JSPROP_PERMANENT, JSPROP_READONLY,
|
||||
HandleObject as RawHandleObject, JS_AtomizeAndPinString, JS_ForwardGetPropertyTo,
|
||||
JS_GetPropertyDescriptorById, JS_HasPropertyById, JS_NewPlainObject, JS_SetReservedSlot,
|
||||
JSAutoRealm, JSCLASS_FOREGROUND_FINALIZE, JSCLASS_RESERVED_SLOTS_SHIFT, JSClass,
|
||||
JSClassOps, JSFunctionSpec, JSITER_HIDDEN, JSITER_OWNONLY, JSITER_SYMBOLS,
|
||||
JSJitGetterCallArgs, JSJitInfo, JSJitInfo__bindgen_ty_1, JSJitInfo__bindgen_ty_2,
|
||||
JSJitInfo__bindgen_ty_3, JSJitInfo_AliasSet, JSJitInfo_ArgType, JSJitInfo_OpType,
|
||||
JSJitMethodCallArgs, JSJitSetterCallArgs, JSNativeWrapper, JSPROP_ENUMERATE,
|
||||
JSPROP_PERMANENT, JSPROP_READONLY, JSPropertySpec, JSPropertySpec_Accessor,
|
||||
JSPropertySpec_AccessorsOrValue, JSPropertySpec_AccessorsOrValue_Accessors,
|
||||
JSPropertySpec_Kind, JSPropertySpec_Name, JSPropertySpec_ValueWrapper,
|
||||
JSPropertySpec_ValueWrapper__bindgen_ty_1, JSPropertySpec_ValueWrapper_Type, JSTracer,
|
||||
JSTypedMethodJitInfo, JSValueType, MutableHandle as RawMutableHandle,
|
||||
MutableHandleIdVector as RawMutableHandleIdVector,
|
||||
MutableHandleObject as RawMutableHandleObject, MutableHandleValue as RawMutableHandleValue,
|
||||
ObjectOpResult, PropertyDescriptor, SymbolCode, UndefinedHandleValue, jsid,
|
||||
};
|
||||
pub(crate) use js::jsval::PrivateValue;
|
||||
pub(crate) use js::panic::wrap_panic;
|
||||
pub(crate) use js::rust::wrappers::{
|
||||
int_to_jsid, AppendToIdVector, Call, GetPropertyKeys, JS_CopyOwnPropertiesAndPrivateFields,
|
||||
AppendToIdVector, Call, GetPropertyKeys, JS_CopyOwnPropertiesAndPrivateFields,
|
||||
JS_DefineProperty, JS_DefinePropertyById2, JS_GetProperty,
|
||||
JS_InitializePropertiesFromCompatibleNativeObject, JS_NewObjectWithGivenProto,
|
||||
JS_NewObjectWithoutMetadata, JS_SetImmutablePrototype, JS_SetProperty, JS_SetPrototype,
|
||||
JS_WrapObject, NewProxyObject, RUST_INTERNED_STRING_TO_JSID, RUST_SYMBOL_TO_JSID,
|
||||
int_to_jsid,
|
||||
};
|
||||
pub(crate) use js::rust::{
|
||||
get_context_realm, get_object_class, get_object_realm, CustomAutoRooterGuard, GCMethods,
|
||||
Handle, MutableHandle,
|
||||
CustomAutoRooterGuard, GCMethods, Handle, MutableHandle, get_context_realm,
|
||||
get_object_class, get_object_realm,
|
||||
};
|
||||
pub(crate) use js::typedarray::{
|
||||
ArrayBuffer, ArrayBufferView, Float32Array, Float64Array, Uint8Array, Uint8ClampedArray,
|
||||
};
|
||||
pub(crate) use js::{
|
||||
jsapi, typedarray, JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL,
|
||||
JSCLASS_RESERVED_SLOTS_MASK, JS_CALLEE,
|
||||
JS_CALLEE, JSCLASS_GLOBAL_SLOT_COUNT, JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL,
|
||||
JSCLASS_RESERVED_SLOTS_MASK, jsapi, typedarray,
|
||||
};
|
||||
pub(crate) use script_bindings::constant::{ConstantSpec, ConstantVal};
|
||||
pub(crate) use servo_config::pref;
|
||||
|
@ -115,11 +116,11 @@ pub(crate) mod module {
|
|||
push_new_element_queue,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::conversions::{
|
||||
is_array_like, jsid_to_string, native_from_handlevalue, native_from_object_static,
|
||||
IDLInterface, StringificationBehavior, ToJSValConvertible, DOM_OBJECT_SLOT,
|
||||
DOM_OBJECT_SLOT, IDLInterface, StringificationBehavior, ToJSValConvertible, is_array_like,
|
||||
jsid_to_string, native_from_handlevalue, native_from_object_static,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::error::{
|
||||
throw_constructor_without_new, Error, ErrorResult,
|
||||
Error, ErrorResult, throw_constructor_without_new,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::finalize::{
|
||||
finalize_common, finalize_global, finalize_weak_referenceable,
|
||||
|
@ -127,16 +128,17 @@ pub(crate) mod module {
|
|||
pub(crate) use crate::dom::bindings::guard::{Condition, Guard};
|
||||
pub(crate) use crate::dom::bindings::inheritance::Castable;
|
||||
pub(crate) use crate::dom::bindings::interface::{
|
||||
create_callback_interface_object, create_global_object, create_interface_prototype_object,
|
||||
create_named_constructors, create_noncallback_interface_object, define_dom_interface,
|
||||
define_guarded_methods, define_guarded_properties, get_desired_proto,
|
||||
get_per_interface_object_handle, is_exposed_in, ConstructorClassHook,
|
||||
InterfaceConstructorBehavior, NonCallbackInterfaceObjectClass, ProtoOrIfaceIndex,
|
||||
ConstructorClassHook, InterfaceConstructorBehavior, NonCallbackInterfaceObjectClass,
|
||||
ProtoOrIfaceIndex, create_callback_interface_object, create_global_object,
|
||||
create_interface_prototype_object, create_named_constructors,
|
||||
create_noncallback_interface_object, define_dom_interface, define_guarded_methods,
|
||||
define_guarded_properties, get_desired_proto, get_per_interface_object_handle,
|
||||
is_exposed_in,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::iterable::{Iterable, IteratorType};
|
||||
pub(crate) use crate::dom::bindings::like::{Maplike, Setlike};
|
||||
pub(crate) use crate::dom::bindings::namespace::{
|
||||
create_namespace_object, NamespaceObjectClass,
|
||||
NamespaceObjectClass, create_namespace_object,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::proxyhandler;
|
||||
pub(crate) use crate::dom::bindings::proxyhandler::{
|
||||
|
@ -149,13 +151,13 @@ pub(crate) mod module {
|
|||
pub(crate) use crate::dom::bindings::root::{Dom, DomSlice, MaybeUnreflectedDom, Root};
|
||||
pub(crate) use crate::dom::bindings::trace::JSTraceable;
|
||||
pub(crate) use crate::dom::bindings::utils::{
|
||||
enumerate_global, exception_to_promise, generic_getter, generic_lenient_getter,
|
||||
generic_lenient_setter, generic_method, generic_setter, generic_static_promise_method,
|
||||
get_array_index_from_id, get_property_on_prototype, has_property_on_prototype,
|
||||
resolve_global, trace_global, AsVoidPtr, DOMClass, DOMJSClass, ProtoOrIfaceArray,
|
||||
DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, JSCLASS_DOM_GLOBAL,
|
||||
AsVoidPtr, DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, DOMClass, DOMJSClass, JSCLASS_DOM_GLOBAL,
|
||||
ProtoOrIfaceArray, enumerate_global, exception_to_promise, generic_getter,
|
||||
generic_lenient_getter, generic_lenient_setter, generic_method, generic_setter,
|
||||
generic_static_promise_method, get_array_index_from_id, get_property_on_prototype,
|
||||
has_property_on_prototype, resolve_global, trace_global,
|
||||
};
|
||||
pub(crate) use crate::dom::bindings::weakref::{WeakReferenceable, DOM_WEAK_SLOT};
|
||||
pub(crate) use crate::dom::bindings::weakref::{DOM_WEAK_SLOT, WeakReferenceable};
|
||||
pub(crate) use crate::dom::types::{AnalyserNode, AudioNode, BaseAudioContext, EventTarget};
|
||||
pub(crate) use crate::mem::malloc_size_of_including_raw_self;
|
||||
pub(crate) use crate::realms::{AlreadyInRealm, InRealm};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue