Skip to content

The get_first lint is applied to VecDeque but the help only mentions first()and not front() #12063

Closed
@HEnquist

Description

@HEnquist

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:

/// Using `x.first()` is easier to read and has the same

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions