unused-peekable Disallow peekable iterators that are never peeked Wrapping an iterator with peekable adds buffered state when no use observes the next value. Instead, you SHOULD use the original iterator until lookahead is required. - Category: performance - Level: warning - Fix: automatic - Scope: module Reported function consume(values: int32[]): void { const iterator = values.iterator().peekable(); iterator.next(); } Accepted function consume(values: int32[]): void { const iterator = values.iterator(); iterator.next(); } Prior art - Clippy ยท unusedpeekable language/linter/src/rules/performance/unusedpeekable.rs:8