LibJS+LibIMAP: Use the new Optional<U>(Optional<T>) constructor

These look much nicer than these repeated ternaries :^)
This commit is contained in:
Idan Horowitz 2022-01-23 17:18:10 +02:00
parent a3a4d0aea2
commit ace36681ff
Notes: sideshowbarker 2024-07-17 20:22:46 +09:00
7 changed files with 23 additions and 28 deletions

View file

@ -725,9 +725,9 @@ static NonnullOwnPtr<Interface> parse_interface(StringView filename, StringView
DictionaryMember member {
required,
move(type),
move(name),
name,
move(extended_attributes),
default_value.has_value() ? default_value.value() : Optional<String> {},
Optional<String>(move(default_value)),
};
dictionary.members.append(move(member));
}