Closed
Bug 1487986
Opened 6 years ago
Closed 6 years ago
webdriver: Prefer x.is_empty() over x.len() == 0
Categories
(Testing :: geckodriver, enhancement)
Testing
geckodriver
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
Details
Attachments
(1 file, 1 obsolete file)
2.34 KB,
patch
|
whimboo
:
review+
|
Details | Diff | Splinter Review |
It is considered better Rust style to use x.is_empty() over x.len()
== 0, so we should do that.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → ato
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•6 years ago
|
||
Attachment #9005815 -
Flags: review?(hskupin)
Comment 2•6 years ago
|
||
Comment on attachment 9005815 [details] [diff] [review]
webdriver: prefer x.is_empty() over x.len() == 0
Review of attachment 9005815 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/webdriver/src/capabilities.rs
@@ +387,5 @@
> &self,
> browser_capabilities: &mut T,
> ) -> WebDriverResult<Option<Capabilities>> {
> let default = vec![Map::new()];
> + let capabilities_list = if self.firstMatch.is_empty() {
You reverse the condition here, which should fail the wdspec tests too.
Attachment #9005815 -
Flags: review?(hskupin) → review-
Assignee | ||
Comment 3•6 years ago
|
||
Attachment #9005815 -
Attachment is obsolete: true
Attachment #9005987 -
Flags: review?(hskupin)
Updated•6 years ago
|
Attachment #9005987 -
Flags: review?(hskupin) → review+
Pushed by ato@sny.no:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ecdba8d9bb22
webdriver: prefer x.is_empty() over x.len() == 0; r=whimboo
Comment 5•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Updated•6 years ago
|
Target Milestone: mozilla64 → mozilla63
Updated•6 years ago
|
Target Milestone: mozilla63 → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•