Skip to content

Commit

Permalink
Merge pull request #1906 from dtolnay-contrib/clippy
Browse files Browse the repository at this point in the history
Resolve Rust 1.75's new get_first clippy lint
  • Loading branch information
Manishearth committed Jan 9, 2024
2 parents b352151 + 0ed652d commit c4222ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ simple_loader!(create_loader, "./locales/", "en-US", core: "./locales/core.ftl",
fn add_bundle_functions(bundle: &mut FluentBundle<&'static FluentResource>) {
bundle
.add_function("EMAIL", |values, _named| {
let email = match values.get(0) {
let email = match values.first() {
Some(FluentValue::String(ref s)) => s,
_ => return FluentValue::None,
};
Expand All @@ -27,7 +27,7 @@ fn add_bundle_functions(bundle: &mut FluentBundle<&'static FluentResource>) {

bundle
.add_function("ENGLISH", |values, _named| {
let text = match values.get(0) {
let text = match values.first() {
Some(FluentValue::String(ref s)) => s,
_ => return FluentValue::None,
};
Expand Down

0 comments on commit c4222ce

Please sign in to comment.