Skip to content

lint: fix clippy get_first#205

Merged
BurntSushi merged 1 commit intoBurntSushi:masterfrom
allan2:clippy-get-first
Feb 12, 2026
Merged

lint: fix clippy get_first#205
BurntSushi merged 1 commit intoBurntSushi:masterfrom
allan2:clippy-get-first

Conversation

@allan2
Copy link
Contributor

@allan2 allan2 commented Feb 12, 2026

This fixes get_first.

This is another style lint. Feel free to close if you prefer get(0).

This fixes
[get_first](https://rust-lang.github.io/rust-clippy/master/index.html#get_first).

This is another style lint. Feel free to close if you prefer `get(0)`.
Copy link
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I very slightly prefer slice::first() here so I'll bring this in. But I generally do not think this kind of a change is a good use of time. slice::get(0) is also perfectly clear.

@BurntSushi BurntSushi merged commit 24f5daa into BurntSushi:master Feb 12, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants