Bug 1577504 - Replace single match with if let r=jgraham
authorDavid Heiberg <dheiberg@mozilla.com>
Tue, 10 Sep 2019 15:02:38 +0000
changeset 492513 cc25750fd9e8b0015f6a693f87d87b2fc3e0a29d
parent 492512 abda0958db89df7fed0a30476de200a532373ba3
child 492514 1dc0b5a41dc8a112955dc5c1640eb6511f2f9b86
push id36559
push useropoprus@mozilla.com
push dateTue, 10 Sep 2019 21:39:50 +0000
treeherdermozilla-central@0e0e9c22321e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1577504
milestone71.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 1577504 - Replace single match with if let r=jgraham Depends on D45357 Differential Revision: https://phabricator.services.mozilla.com/D45358
testing/mozbase/rust/mozrunner/src/runner.rs
--- a/testing/mozbase/rust/mozrunner/src/runner.rs
+++ b/testing/mozbase/rust/mozrunner/src/runner.rs
@@ -329,23 +329,20 @@ pub mod platform {
     pub fn resolve_binary_path(path: &mut PathBuf) -> &PathBuf {
         if path.as_path().is_dir() {
             let mut info_plist = path.clone();
             info_plist.push("Contents");
             info_plist.push("Info.plist");
             if let Ok(plist) = Value::from_file(&info_plist) {
                 if let Some(dict) = plist.as_dictionary() {
                     if let Some(binary_file) = dict.get("CFBundleExecutable") {
-                        match binary_file {
-                            Value::String(s) => {
-                                path.push("Contents");
-                                path.push("MacOS");
-                                path.push(s);
-                            }
-                            _ => {}
+                        if let Value::String(s) = binary_file {
+                            path.push("Contents");
+                            path.push("MacOS");
+                            path.push(s);
                         }
                     }
                 }
             }
         }
         path
     }