mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibJS: Port get_difference_settings() to String
Also make balance_duration() take a StringView as part of this, it only does equality checks.
This commit is contained in:
parent
227379a1da
commit
8f7c2f8292
Notes:
sideshowbarker
2024-07-17 05:02:42 +09:00
Author: https://github.com/linusg
Commit: 8f7c2f8292
Pull-request: https://github.com/SerenityOS/serenity/pull/17186
Reviewed-by: https://github.com/trflynn89 ✅
8 changed files with 14 additions and 14 deletions
|
@ -1863,9 +1863,9 @@ ThrowCompletionOr<DifferenceSettings> get_difference_settings(VM& vm, Difference
|
|||
|
||||
// 13. Return the Record { [[SmallestUnit]]: smallestUnit, [[LargestUnit]]: largestUnit, [[RoundingMode]]: roundingMode, [[RoundingIncrement]]: roundingIncrement, [[Options]]: options }.
|
||||
return DifferenceSettings {
|
||||
.smallest_unit = smallest_unit->to_deprecated_string(),
|
||||
.largest_unit = largest_unit->to_deprecated_string(),
|
||||
.rounding_mode = rounding_mode.to_deprecated_string(),
|
||||
.smallest_unit = smallest_unit.release_value(),
|
||||
.largest_unit = largest_unit.release_value(),
|
||||
.rounding_mode = move(rounding_mode),
|
||||
.rounding_increment = rounding_increment,
|
||||
.options = *options,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue