Bug 1575263 - Use assignment operators instead of longer form r=jgraham
authorDavid Heiberg <dheiberg@mozilla.com>
Thu, 29 Aug 2019 10:24:26 +0000
changeset 551099 2c2e8bf45df9051dd87d5020032a1001a3531554
parent 551098 389d3e7d277a0f94576c7cdf913dd074ead3409f
child 551100 47ce7a659a1f6ec0f06577727385826ced65796c
push id11865
push userbtara@mozilla.com
push dateMon, 02 Sep 2019 08:54:37 +0000
treeherdermozilla-beta@37f59c4671b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1575263
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1575263 - Use assignment operators instead of longer form r=jgraham Depends on D43940 Differential Revision: https://phabricator.services.mozilla.com/D43941
testing/geckodriver/src/marionette.rs
--- a/testing/geckodriver/src/marionette.rs
+++ b/testing/geckodriver/src/marionette.rs
@@ -415,17 +415,17 @@ impl MarionetteSession {
             ErrorStatus::UnknownError,
             "Failed to convert web element reference value to string"
         )
         .to_string();
         Ok(WebElement(id))
     }
 
     pub fn next_command_id(&mut self) -> MessageId {
-        self.command_id = self.command_id + 1;
+        self.command_id += 1;
         self.command_id
     }
 
     pub fn response(
         &mut self,
         msg: &WebDriverMessage<GeckoExtensionRoute>,
         resp: MarionetteResponse,
     ) -> WebDriverResult<WebDriverResponse> {
@@ -1348,17 +1348,17 @@ impl MarionetteConnection {
                         "EOF reading marionette message",
                     ))
                 }
                 1 => buf[0] as char,
                 _ => panic!("Expected one byte got more"),
             };
             match byte {
                 '0'..='9' => {
-                    bytes = bytes * 10;
+                    bytes *= 10;
                     bytes += byte as usize - '0' as usize;
                 }
                 ':' => break,
                 _ => {}
             }
         }
 
         let buf = &mut [0 as u8; 8192];