feature: added ToSliceUnsafe method to array list
This commit is contained in:
parent
574f36e64e
commit
b5430036f9
@ -193,6 +193,10 @@ func (self *ArrayList[T]) ToSlice() []T {
|
||||
return result
|
||||
}
|
||||
|
||||
func (self *ArrayList[T]) ToSliceUnsafe() []T {
|
||||
return self.content[:self.size]
|
||||
}
|
||||
|
||||
func (self *ArrayList[T]) Find(filter func(T) bool) *optional.Optional[T] {
|
||||
for index, value := range self.content {
|
||||
if index >= self.size {
|
||||
|
Loading…
Reference in New Issue
Block a user