Bug 1575263 - Remove redundant field names r=jgraham
authorDavid Heiberg <dheiberg@mozilla.com>
Thu, 29 Aug 2019 10:24:48 +0000
changeset 551098 389d3e7d277a0f94576c7cdf913dd074ead3409f
parent 551097 f2304044254838ff8af07b1ece5fd92cae41b13f
child 551099 2c2e8bf45df9051dd87d5020032a1001a3531554
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 - Remove redundant field names r=jgraham Depends on D43939 Differential Revision: https://phabricator.services.mozilla.com/D43940
testing/geckodriver/src/capabilities.rs
testing/geckodriver/src/command.rs
testing/geckodriver/src/marionette.rs
--- a/testing/geckodriver/src/capabilities.rs
+++ b/testing/geckodriver/src/capabilities.rs
@@ -33,17 +33,17 @@ pub struct FirefoxCapabilities<'a> {
     fallback_binary: Option<&'a PathBuf>,
     version_cache: BTreeMap<PathBuf, String>,
 }
 
 impl<'a> FirefoxCapabilities<'a> {
     pub fn new(fallback_binary: Option<&'a PathBuf>) -> FirefoxCapabilities<'a> {
         FirefoxCapabilities {
             chosen_binary: None,
-            fallback_binary: fallback_binary,
+            fallback_binary,
             version_cache: BTreeMap::new(),
         }
     }
 
     fn set_binary(&mut self, capabilities: &Map<String, Value>) {
         self.chosen_binary = capabilities
             .get("moz:firefoxOptions")
             .and_then(|x| x.get("binary"))
--- a/testing/geckodriver/src/command.rs
+++ b/testing/geckodriver/src/command.rs
@@ -189,17 +189,17 @@ impl<'de> Deserialize<'de> for AddonInst
                     .map_err(de::Error::custom)?;
 
                 let path = match path.to_str() {
                     Some(path) => path.to_string(),
                     None => return Err(de::Error::custom("could not write addon to file")),
                 };
 
                 AddonInstallParameters {
-                    path: path,
+                    path,
                     temporary: data.temporary,
                 }
             }
         };
 
         Ok(params)
     }
 }
--- a/testing/geckodriver/src/marionette.rs
+++ b/testing/geckodriver/src/marionette.rs
@@ -518,19 +518,19 @@ impl MarionetteSession {
                         "Missing field: implicit"
                     )
                     .as_u64(),
                     ErrorStatus::UnknownError,
                     "Failed to interpret implicit search duration as u64"
                 );
 
                 WebDriverResponse::Timeouts(TimeoutsResponse {
-                    script: script,
-                    page_load: page_load,
-                    implicit: implicit,
+                    script,
+                    page_load,
+                    implicit,
                 })
             }
             Status => panic!("Got status command that should already have been handled"),
             GetWindowHandles => WebDriverResponse::Generic(resp.to_value_response(false)?),
             NewWindow(_) => {
                 let handle: String = try_opt!(
                     try_opt!(
                         resp.result.get("handle"),
@@ -944,19 +944,19 @@ impl Serialize for MarionetteCommand {
         let data = (&0, &self.id, &self.name, &self.params);
         data.serialize(serializer)
     }
 }
 
 impl MarionetteCommand {
     fn new(id: MessageId, name: String, params: Map<String, Value>) -> MarionetteCommand {
         MarionetteCommand {
-            id: id,
-            name: name,
-            params: params,
+            id,
+            name,
+            params,
         }
     }
 
     fn encode_msg<T>(msg: T) -> WebDriverResult<String>
     where
         T: serde::Serialize,
     {
         let data = serde_json::to_string(&msg)?;