1
0
Fork 0
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:
Linus Groh 2023-01-26 14:43:42 +00:00
parent 227379a1da
commit 8f7c2f8292
Notes: sideshowbarker 2024-07-17 05:02:42 +09:00
8 changed files with 14 additions and 14 deletions

View file

@ -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,
};