Closed
Bug 1492652
Opened 6 years ago
Closed 6 years ago
Avoid cloning of log level when initialising logging
Categories
(Testing :: geckodriver, enhancement, P1)
Testing
geckodriver
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
Details
Attachments
(1 file)
1.03 KB,
patch
|
jgraham
:
review+
|
Details | Diff | Splinter Review |
In geckodriver we clone the log level when calling logging::init_with_level, but since it implements the Copy trait we can get away with simply dereferencing it.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: -- → P1
Assignee | ||
Comment 1•6 years ago
|
||
Instead of cloning we can dereference the logging level since it derives the Copy trait.
Attachment #9010489 -
Flags: review?(hskupin)
Comment 2•6 years ago
|
||
Comment on attachment 9010489 [details] [diff] [review] geckodriver: avoid cloning log level on init Review of attachment 9010489 [details] [diff] [review]: ----------------------------------------------------------------- I would like to forward this to James, given that I miss the connection between Copy and Clone here, and which side-effects this could have.
Attachment #9010489 -
Flags: review?(hskupin) → review?(james)
Updated•6 years ago
|
Attachment #9010489 -
Flags: review?(james) → review+
Pushed by ato@sny.no: https://hg.mozilla.org/integration/mozilla-inbound/rev/f9d053ee3931 geckodriver: avoid cloning log level on init; r=jgraham
Comment 4•6 years ago
|
||
Comment on attachment 9010489 [details] [diff] [review] geckodriver: avoid cloning log level on init Review of attachment 9010489 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/geckodriver/src/main.rs @@ +179,5 @@ > _ => Some(logging::Level::Trace), > } > }; > if let Some(ref level) = log_level { > + logging::init_with_level(*level).unwrap(); Could have been if let Some(level) = log_level { logging::init_with_level(level).unwrap(); }
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f9d053ee3931
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•