Closed Bug 1747544 Opened 5 months ago Closed 2 months ago

bench.rs: length comparison to zero

Categories

(Firefox Build System :: Source Code Analysis, task)

task

Tracking

(firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: Sylvestre, Assigned: bourg.garrett, Mentored)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

Filling as a good first bug to learn workflows.

hs.len() == 0
should use .is_empty() instead

https://searchfox.org/mozilla-central/rev/cc4a22e024a23183e53696bf6dc5014e407a29ff/xpcom/rust/gtest/bench-collections/bench.rs#97

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/#len_zero

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

(In reply to Sylvestre Ledru [:Sylvestre] from comment #0)

should use .empty() instead

.is_empty() right? :)

indeed, lazy clone for the C++ equivalent :)
I updated comment #0

I'd like to give this a shot. I've gone through the first several steps in the contribution guide and I found the right file to update.

Assignee: nobody → bourg.garrett
Status: NEW → ASSIGNED

My patch was approved, but I could use some help getting this change landed. Is there a particular place I need to go to ask for assistance from the reviewer?

Using the "Request more information" flag in bugzilla is more effective than commenting on phabricator because comments on phabricator are easy-ish to miss. Nika probably missed it, I've pushed the patch for you. Thanks!

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/11516564cff9
Fix lint warning on string comparison in bench.rs. r=nika
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.