1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

LibJS: Use MUST() where applicable

This commit is contained in:
Linus Groh 2021-10-03 15:57:26 +01:00
parent 7cd3f7de61
commit 4d5bd092ea
14 changed files with 58 additions and 56 deletions

View file

@ -81,7 +81,7 @@ ThrowCompletionOr<Calendar*> get_builtin_calendar(GlobalObject& global_object, S
Calendar* get_iso8601_calendar(GlobalObject& global_object)
{
// 1. Return ! GetBuiltinCalendar("iso8601").
return get_builtin_calendar(global_object, "iso8601").release_value();
return MUST(get_builtin_calendar(global_object, "iso8601"));
}
// 12.1.5 CalendarFields ( calendar, fieldNames ), https://tc39.es/proposal-temporal/#sec-temporal-calendarfields
@ -358,7 +358,7 @@ ThrowCompletionOr<Object*> to_temporal_calendar(GlobalObject& global_object, Val
}
// 4. Return ! CreateTemporalCalendar(identifier).
return create_temporal_calendar(global_object, identifier).release_value();
return MUST(create_temporal_calendar(global_object, identifier));
}
// 12.1.22 ToTemporalCalendarWithISODefault ( temporalCalendarLike ), https://tc39.es/proposal-temporal/#sec-temporal-totemporalcalendarwithisodefault