Closed Bug 1747555 Opened 3 years ago Closed 3 years ago

smoosh/build.rs: use `if let` instead of a match

Categories

(Developer Infrastructure :: Source Code Analysis, task)

Tracking

(firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: Sylvestre, Assigned: gustavosantaremsilva, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug, Whiteboard: [lang=rust])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1747544 +++

Filling as a good first bug to learn workflows.

if let will suffice.

TEST-UNEXPECTED-WARNING | /builds/worker/checkouts/gecko/js/src/frontend/smoosh/build.rs:18:5 | you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` (clippy::single_match) 

https://searchfox.org/mozilla-central/rev/cc4a22e024a23183e53696bf6dc5014e407a29ff/js/src/frontend/smoosh/build.rs#18-23

As the change is trivial, it is just to learn how to contribute to Firefox.

Found by https://rust-lang.github.io/rust-clippy/master/#single_match

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html

Assignee: nobody → gustavosantaremsilva
Status: NEW → ASSIGNED

Hello!

I followed the process and I pushed the submission to Phabricator - Hope I did it right and assigned you as the reviewer of the change. I'm sorry if I did not but I am not used to Mercurial and all these tools :)

Please let me know your feedback and what I missed, if anything.

Thanks in advance!

Attachment #9266774 - Attachment description: Bug 1747555 - Replaces match with if let. r=sylvestre → Bug 1747555 - smoosh/build.rs - Replaces match with if let. r=sylvestre
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14a29694003a smoosh/build.rs - Replaces match with if let. r=arai
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: