roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.02k stars 203 forks source link

Implement Array front() and back() #670

Closed gavv closed 5 months ago

gavv commented 6 months ago

core::List, core::Hashmap and other classes in roc_core have front() and back() methods.

It would be nice to add front() and back() to core::Array too.

Unlike List, Array holds values, not pointers, so these methods should return references, not pointers. They should panic if array is empty.

New methods should be covered with tests.

khansamad47 commented 5 months ago

@gavv would like to work on this one if not already assigned.

gavv commented 5 months ago

Sure, thanks!

gavv commented 5 months ago

Landed