mirror of
https://github.com/luxfi/container.git
synced 2026-09-24 00:24:34 +00:00
20 lines
365 B
Go
20 lines
365 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package iterator
|
|
|
|
var _ Iterator[any] = Empty[any]{}
|
|
|
|
// Empty is an iterator with no elements.
|
|
type Empty[T any] struct{}
|
|
|
|
func (Empty[_]) Next() bool {
|
|
return false
|
|
}
|
|
|
|
func (Empty[T]) Value() T {
|
|
return zero[T]()
|
|
}
|
|
|
|
func (Empty[_]) Release() {}
|