mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:17:45 +00:00
AK: Remove try_
prefix from FixedArray creation functions
This commit is contained in:
parent
909c2a73c4
commit
9c08bb9555
26 changed files with 57 additions and 59 deletions
|
@ -226,12 +226,10 @@ FixedArray<T> shatter_chunk(FixedArray<T>& source_chunk, size_t start, size_t sl
|
|||
if constexpr (IsTriviallyConstructible<T>) {
|
||||
TypedTransfer<T>::move(new_chunk.data(), wanted_slice.data(), wanted_slice.size());
|
||||
} else {
|
||||
// FIXME: propagate errors
|
||||
auto copied_chunk = MUST(FixedArray<T>::try_create(wanted_slice));
|
||||
auto copied_chunk = FixedArray<T>::create(wanted_slice).release_value_but_fixme_should_propagate_errors();
|
||||
new_chunk.swap(copied_chunk);
|
||||
}
|
||||
// FIXME: propagate errors
|
||||
auto rest_of_chunk = MUST(FixedArray<T>::try_create(source_chunk.span().slice(start)));
|
||||
auto rest_of_chunk = FixedArray<T>::create(source_chunk.span().slice(start)).release_value_but_fixme_should_propagate_errors();
|
||||
source_chunk.swap(rest_of_chunk);
|
||||
return new_chunk;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue