Closed Bug 1487988 Opened 2 years ago Closed 2 years ago

webdriver: Single characters patterns should be chars instead of strings

Categories

(Testing :: geckodriver, enhancement)

enhancement
Not set

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: ato, Assigned: ato)

Details

Attachments

(1 file, 1 obsolete file)

Instead of:

> if !component.ends_with("}") {

It is more efficient to match on a char:

> if !component.ends_with('}') {
Assignee: nobody → ato
Status: NEW → ASSIGNED
Single-character constant patterns should be made into chars as
these are faster to use and does not require heap memory allocation.
Attachment #9005817 - Flags: review?(hskupin)
Single-character constant patterns should be made into chars as
these are faster to use and does not require heap memory allocation.
Attachment #9005817 - Attachment is obsolete: true
Attachment #9005821 - Flags: review?(hskupin)
Attachment #9005817 - Flags: review?(hskupin)
Pushed by ato@sny.no:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eba010e030a9
webdriver: make single character patterns use chars; r=whimboo
https://hg.mozilla.org/mozilla-central/rev/eba010e030a9
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.