the at
method on Array
(and Span) returns @T
while on ByteArray
it returns Option<T>
.
#4255
Labels
enhancement
New feature or request
I think that keeping a consistent interface between the three is important for a good developer experience.
Proposal:
get
method onByteArray
that returnsOption<T>
(could even beOption<@T>
if we want maximum consistency, but unlike for "natural" arrays this doesn't really make sense)at
to returnT
(or@T
) or panic, like arraysByteArrayIndexView
to just return whatself.at(index)
returns, no more need for error management since we refactoredat()
I can submit a PR if agreed
The text was updated successfully, but these errors were encountered: