Closed
Description
Description
The help text for the get_first
lint assumes that first()
is the method to use instead of get(0)
, but this does not exist for a VecDeque. There, the front()
method is the equivalent.
The text is defined here:
rust-clippy/clippy_lints/src/methods/mod.rs
Line 2596 in 7f185bd
I'm assuming that the text was written before the lint was applied also to VecDeque, but now it's a bit misleading.
The suggestion however is correct, example:
help: try:
self.buffer.front()`
Version
No response
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
No labels