Closed Bug 2042426 Opened 4 months ago Closed 1 month ago

Fix clippy warnings in dom/base/fragmentdirectives/lib.rs

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox156 fixed)

RESOLVED FIXED
156 Branch
Tracking Status
firefox156 --- fixed

People

(Reporter: Sylvestre, Assigned: gopal)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

Filing as a good first bug to learn workflows.

dom/base/fragmentdirectives/lib.rs
  106:22  warning  redundant closure  clippy::redundant_closure (clippy)

Link to the code:
https://searchfox.org/mozilla-central/source/dom/base/fragmentdirectives/lib.rs#106

To run the linter:

./mach lint -W -l clippy dom/base/fragmentdirectives/lib.rs

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

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Whiteboard: [lang=rust]

./mach lint -W -l clippy dom/base/fragmentdirectives/lib.rs
✖ 0 problems (0 errors, 0 warnings, 0 fixed)

Flags: needinfo?(sledru)

you could have needinfo once and talk to me :(

Flags: needinfo?(sledru)

seems that you have a problem with your configuration:


./mach lint -W -l clippy dom/base/fragmentdirectives/lib.rs
[...]
✖ 37 problems (0 errors, 37 warnings, 0 fixed)

run it with -v to see errors

I'm really sorry for repeated needinfo. I'll be mindful of this in future.
You are correct. There is a problem with my configuration as it still shows 0 warnings.

Assignee: nobody → gopal
Status: NEW → ASSIGNED
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/91613ab000fd https://hg.mozilla.org/integration/autoland/rev/a69d9d31fb61 Revert "Bug 2042426 - fixed clippy warnings in dom/base/fragmentdirectives/lib.rs r=sylvestre" for causing build bustages

(In reply to Sandor Molnar[:smolnar] from comment #8)

Backed out for causing build bustages

Backout link: https://hg.mozilla.org/integration/autoland/rev/a69d9d31fb6117b7b2058da10c2162a25cd3a7b6

Push with failures

Failures log ->ERROR - error[E0308]: arguments to this function are incorrect

Apologies, let me test all the changes. Looks like the recent commit messed it up. My bad.
Thanks for reverting.

Flags: needinfo?(gopal)
./mach build      # passes
./mach run        # launches cleanly without any issues
./mach rusttests  # all pass
./mach lint -W -l clippy dom/base/fragmentdirectives/lib.rs # no warnings related to the crate
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
Duplicate of this bug: 2051331
You need to log in before you can comment on or make changes to this bug.