Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Rust 1.75's new get_first clippy lint #1906

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Jan 9, 2024

CI in #1905 is failing because the default rustc available in GitHub's runner got bumped from 1.74 to 1.75 recently.

error: accessing first element with `values.get(0)`
  --> src/i18n.rs:20:31
   |
20 |             let email = match values.get(0) {
   |                               ^^^^^^^^^^^^^ help: try: `values.first()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
   = note: `-D clippy::get-first` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::get_first)]`

error: accessing first element with `values.get(0)`
  --> src/i18n.rs:30:30
   |
30 |             let text = match values.get(0) {
   |                              ^^^^^^^^^^^^^ help: try: `values.first()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first

    warning: accessing first element with `values.get(0)`
      --> src/i18n.rs:20:31
       |
    20 |             let email = match values.get(0) {
       |                               ^^^^^^^^^^^^^ help: try: `values.first()`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
       = note: `#[warn(clippy::get_first)]` on by default

    warning: accessing first element with `values.get(0)`
      --> src/i18n.rs:30:30
       |
    30 |             let text = match values.get(0) {
       |                              ^^^^^^^^^^^^^ help: try: `values.first()`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
@dtolnay dtolnay requested a review from a team as a code owner January 9, 2024 21:41
@Manishearth Manishearth merged commit c4222ce into rust-lang:master Jan 9, 2024
1 check passed
@dtolnay dtolnay deleted the clippy branch January 9, 2024 21:46
This was referenced Jan 9, 2024
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.

None yet

2 participants