From b2d29cd9f54a08aea5c621a576dfc0145592e4ca Mon Sep 17 00:00:00 2001 From: Aapo Alasuutari Date: Sun, 8 Mar 2026 00:34:33 +0200 Subject: [PATCH] fix: lint errors --- .../ecmascript/builtins/temporal/duration.rs | 20 +------------------ .../temporal/instant/instant_prototype.rs | 2 +- .../ecmascript/builtins/temporal/options.rs | 4 ++-- nova_vm/src/ecmascript/execution/agent.rs | 2 +- .../src/ecmascript/types/spec/data_block.rs | 2 +- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/nova_vm/src/ecmascript/builtins/temporal/duration.rs b/nova_vm/src/ecmascript/builtins/temporal/duration.rs index ce274829b..2abf64791 100644 --- a/nova_vm/src/ecmascript/builtins/temporal/duration.rs +++ b/nova_vm/src/ecmascript/builtins/temporal/duration.rs @@ -153,7 +153,7 @@ pub(crate) fn create_temporal_duration<'gc>( /// language value) and returns either a normal completion containing a /// Temporal.Duration or a throw completion. Converts item to a new /// Temporal.Duration instance if possible and returns that, and throws -/// otherwise. It performs the following steps when called: +/// otherwise. pub(crate) fn to_temporal_duration<'gc>( agent: &mut Agent, item: Value, @@ -384,24 +384,6 @@ pub(crate) fn to_temporal_partial_duration_record<'gc>( Ok(result) } -/// [7.5.20 CreateNegatedTemporalDuration ( duration )] (https://tc39.es/proposal-temporal/#sec-temporal-createnegatedtemporalduration) -/// The abstract operation CreateNegatedTemporalDuration takes argument -/// duration (a Temporal.Duration) and returns a Temporal.Duration. -/// It returns a new Temporal.Duration instance that is the -/// negation of duration. -pub(crate) fn _create_negated_temporal_duration<'gc>( - _agent: &mut Agent, - _item: temporal_rs::Duration, - mut _gc: GcScope<'gc, '_>, -) -> JsResult<'gc, temporal_rs::Duration> { - // 1. Return ! CreateTemporalDuration(-duration.[[Years]], - // -duration.[[Months]], -duration.[[Weeks]], -duration.[[Days]], - // -duration.[[Hours]], -duration.[[Minutes]], -duration.[[Seconds]], - // -duration.[[Milliseconds]], -duration.[[Microseconds]], - // -duration.[[Nanoseconds]]). - unimplemented!() -} - #[inline(always)] pub(crate) fn _require_internal_slot_temporal_duration<'a>( agent: &mut Agent, diff --git a/nova_vm/src/ecmascript/builtins/temporal/instant/instant_prototype.rs b/nova_vm/src/ecmascript/builtins/temporal/instant/instant_prototype.rs index 4d300fac4..7a5c643ea 100644 --- a/nova_vm/src/ecmascript/builtins/temporal/instant/instant_prototype.rs +++ b/nova_vm/src/ecmascript/builtins/temporal/instant/instant_prototype.rs @@ -633,7 +633,7 @@ impl TemporalInstantPrototype { /// The abstract operation ToIntegerWithTruncation takes argument argument (an ECMAScript language /// value) and returns either a normal completion containing an integer or a throw completion. It /// converts argument to an integer representing its Number value with fractional part truncated, or -/// throws a RangeError when that value is not finite. It performs the following steps when called: +/// throws a RangeError when that value is not finite. pub(crate) fn to_integer_with_truncation<'gc>( agent: &mut Agent, argument: Value, diff --git a/nova_vm/src/ecmascript/builtins/temporal/options.rs b/nova_vm/src/ecmascript/builtins/temporal/options.rs index 7641ae3fc..0cde9f718 100644 --- a/nova_vm/src/ecmascript/builtins/temporal/options.rs +++ b/nova_vm/src/ecmascript/builtins/temporal/options.rs @@ -145,7 +145,7 @@ where // The abstract operation GetRoundingModeOption takes arguments options (an Object) and fallback (a // rounding mode) and returns either a normal completion containing a rounding mode, or a throw // completion. It fetches and validates the "roundingMode" property from options, returning -// fallback as a default if absent. It performs the following steps when called: +// fallback as a default if absent. pub(crate) fn get_rounding_mode_option<'gc>( agent: &mut Agent, options: Object, @@ -179,7 +179,7 @@ pub(crate) fn get_rounding_mode_option<'gc>( /// Object) and returns either a normal completion containing a positive integer /// in the inclusive interval from 1 to 10**9, or a throw completion. It fetches /// and validates the "roundingIncrement" property from options, returning a -/// default if absent. It performs the following steps when called: +/// default if absent. pub(crate) fn get_rounding_increment_option<'gc>( agent: &mut Agent, options: Object, diff --git a/nova_vm/src/ecmascript/execution/agent.rs b/nova_vm/src/ecmascript/execution/agent.rs index 5ef4e09fc..edf4980ea 100644 --- a/nova_vm/src/ecmascript/execution/agent.rs +++ b/nova_vm/src/ecmascript/execution/agent.rs @@ -262,7 +262,7 @@ pub(crate) enum InnerJob { FinalizationRegistry(FinalizationRegistryCleanupJob), } -/// ## [Job](https://tc39.es/ecma262/#sec-jobs) +/// # [Job](https://tc39.es/ecma262/#sec-jobs) /// /// A _Job_ is an Abstract Closure with no parameters that initiates an /// ECMAScript computation when no other ECMAScript computation is currently in diff --git a/nova_vm/src/ecmascript/types/spec/data_block.rs b/nova_vm/src/ecmascript/types/spec/data_block.rs index 77fa0214f..fee2a7c63 100644 --- a/nova_vm/src/ecmascript/types/spec/data_block.rs +++ b/nova_vm/src/ecmascript/types/spec/data_block.rs @@ -546,7 +546,7 @@ impl WaiterLists { } } -/// # [6.2.9 Data Blocks](https://tc39.es/ecma262/#sec-data-blocks) +/// ### [6.2.9 Data Blocks](https://tc39.es/ecma262/#sec-data-blocks) /// /// The Shared Data Block specification type is used to describe a distinct and /// mutable sequence of byte-sized (8 bit) racy atomic memory values. A byte