Closed
Bug 1409438
Opened 7 years ago
Closed 7 years ago
Silence unnecessary mutable variable warnings
Categories
(Testing :: geckodriver, defect)
Tracking
(firefox58 fixed)
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
Details
Attachments
(1 file)
From a build off mozilla-central with Rust stable:
> warning: variable does not need to be mutable
> --> /home/ato/src/gecko/testing/webdriver/src/capabilities.rs:470:20
> |
> 470 | |mut caps, (key, value)| {
> | ^^^^^^^^
> |
> = note: #[warn(unused_mut)] on by default
>
> warning: variable does not need to be mutable
> --> src/marionette.rs:1459:13
> |
> 1459 | let mut stream = self.stream.as_mut().unwrap();
> | ^^^^^^^^^^
> |
> = note: #[warn(unused_mut)] on by default
>
> warning: variable does not need to be mutable
> --> src/marionette.rs:1461:17
> |
> 1461 | let mut buf = &mut [0 as u8];
> | ^^^^^^^
>
> warning: variable does not need to be mutable
> --> src/marionette.rs:1483:13
> |
> 1483 | let mut buf = &mut [0 as u8; 8192];
> | ^^^^^^^
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → ato
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8919346 [details]
Bug 1409438 - Make references to mutable variables immutable.
https://reviewboard.mozilla.org/r/190204/#review195498
Please update the commit message so it says that you fix those warnings. Silencing gives a complete false meaning. First I thought you didn't want to let them show. It's good to see that you actually fixed them.
Also for future patches please only change what you have to cover by the bug, and leave other stuff like refactorings to other bugs, or at least create another commit. Thanks.
Attachment #8919346 -
Flags: review?(hskupin) → review+
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8919346 [details]
Bug 1409438 - Make references to mutable variables immutable.
https://reviewboard.mozilla.org/r/190204/#review195500
::: commit-message-f2710:1
(Diff revision 2)
> +Bug 1409438 - Silence unnecessary mutable variable warnings. r?whimboo
Adding this issue so it's not getting lost by the review comment.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #3)
> Please update the commit message so it says that you fix those
> warnings. Silencing gives a complete false meaning. First I
> thought you didn't want to let them show. It's good to see that
> you actually fixed them.
Fixed.
> Also for future patches please only change what you have to cover
> by the bug, and leave other stuff like refactorings to other bugs,
> or at least create another commit. Thanks.
I indented the code I touched but didn’t refactor anything?
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d52b2b0c9387
Make references to mutable variables immutable. r=whimboo
Comment 8•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•