Skip to content

Commit 1855709

Browse files
committed
Fix formatting
1 parent 94b2d35 commit 1855709

File tree

12 files changed

+68
-32
lines changed

12 files changed

+68
-32
lines changed

rust/src/chrome.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,9 @@ impl SeleniumManager for ChromeManager {
384384
"mac64"
385385
}
386386
} else if LINUX.is(os) && ARM64.is(arch) {
387-
return Err(anyhow!("Linux arm64 is not supported yet by Google Chrome. Please try another browser."));
387+
return Err(anyhow!(
388+
"Linux arm64 is not supported yet by Google Chrome. Please try another browser."
389+
));
388390
} else {
389391
"linux64"
390392
};

rust/src/edge.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ impl SeleniumManager for EdgeManager {
290290
"mac64"
291291
}
292292
} else if LINUX.is(os) && ARM64.is(arch) {
293-
return Err(anyhow!("Linux arm64 is not supported yet by Microsoft Edge. Please try another browser."));
293+
return Err(anyhow!(
294+
"Linux arm64 is not supported yet by Microsoft Edge. Please try another browser."
295+
));
294296
} else {
295297
"linux64"
296298
};

rust/tests/browser_download_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ mod common;
2929
#[case("edge")]
3030
fn browser_latest_download_test(#[case] browser: String) {
3131
if browser.eq("edge") && OS.eq("windows") {
32-
return;
32+
return;
3333
} else if OS.eq("linux") && ARCH.eq("aarch64") && !browser.eq("firefox") {
34-
return;
34+
return;
3535
}
3636

3737
let mut cmd = get_selenium_manager();

rust/tests/browser_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fn browser_version_test(
4242
#[case] driver_version: String,
4343
) {
4444
if OS.eq("linux") && ARCH.eq("aarch64") && !browser.eq("firefox") {
45-
return;
45+
return;
4646
}
4747

4848
let mut cmd = get_selenium_manager();
@@ -84,7 +84,7 @@ fn wrong_parameters_test(
8484
#[case] error_code: i32,
8585
) {
8686
if OS.eq("linux") && ARCH.eq("aarch64") && !browser.eq("firefox") {
87-
return
87+
return;
8888
}
8989

9090
let mut cmd = get_selenium_manager();

rust/tests/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,5 @@ pub fn assert_output(
123123

124124
#[allow(dead_code)]
125125
pub fn is_linux_arm64() -> bool {
126-
OS == "linux" && ARCH == "aarch64"
126+
OS == "linux" && ARCH == "aarch64"
127127
}

rust/tests/config_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mod common;
3333
#[case("edge")]
3434
fn config_test(#[case] browser_name: String) {
3535
if OS.eq("linux") && ARCH.eq("aarch64") && !browser_name.eq("firefox") {
36-
return
36+
return;
3737
}
3838
let tmp_dir = Builder::new().prefix("sm-config-test").tempdir().unwrap();
3939
let config_path = tmp_dir.path().join("se-config.toml");

rust/tests/exec_driver_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mod common;
3030
#[case("iexplorer", "IEDriverServer")]
3131
fn exec_driver_test(#[case] browser_name: String, #[case] driver_name: String) {
3232
if OS.eq("linux") && ARCH.eq("aarch64") && !browser_name.eq("firefox") {
33-
return
33+
return;
3434
}
3535

3636
let mut cmd = get_selenium_manager();

rust/tests/mirror_tests.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use crate::common::{assert_driver, is_linux_arm64, get_selenium_manager};
18+
use crate::common::{assert_driver, get_selenium_manager, is_linux_arm64};
1919

2020
mod common;
2121

@@ -24,7 +24,11 @@ fn mirror_test() {
2424
let mut cmd = get_selenium_manager();
2525
cmd.args([
2626
"--browser",
27-
if is_linux_arm64() { "firefox" } else { "chrome" },
27+
if is_linux_arm64() {
28+
"firefox"
29+
} else {
30+
"chrome"
31+
},
2832
"--driver-mirror-url",
2933
"https://registry.npmmirror.com/-/binary/chromedriver/",
3034
"--browser-version",

rust/tests/offline_tests.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ fn offline_test() {
2525
cmd.args([
2626
"--debug",
2727
"--browser",
28-
if is_linux_arm64() { "firefox" } else { "chrome" },
29-
"--offline"
28+
if is_linux_arm64() {
29+
"firefox"
30+
} else {
31+
"chrome"
32+
},
33+
"--offline",
3034
])
3135
.assert()
3236
.success()

rust/tests/output_tests.rs

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ mod common;
2626
fn json_output_test() {
2727
let mut cmd = get_selenium_manager();
2828
cmd.args([
29-
"--browser",
30-
if is_linux_arm64() { "firefox" } else { "chrome" },
31-
"--output",
32-
"json"
29+
"--browser",
30+
if is_linux_arm64() {
31+
"firefox"
32+
} else {
33+
"chrome"
34+
},
35+
"--output",
36+
"json",
3337
])
3438
.assert()
3539
.success()
@@ -51,10 +55,14 @@ fn json_output_test() {
5155
fn shell_output_test() {
5256
let mut cmd = get_selenium_manager();
5357
cmd.args([
54-
"--browser",
55-
if is_linux_arm64() { "firefox" } else { "chrome" },
56-
"--output",
57-
"shell"
58+
"--browser",
59+
if is_linux_arm64() {
60+
"firefox"
61+
} else {
62+
"chrome"
63+
},
64+
"--output",
65+
"shell",
5866
])
5967
.assert()
6068
.success()
@@ -68,10 +76,14 @@ fn shell_output_test() {
6876
fn mixed_output_test() {
6977
let mut cmd = get_selenium_manager();
7078
cmd.args([
71-
"--browser",
72-
if is_linux_arm64() { "firefox" } else { "chrome" },
73-
"--output",
74-
"mixed"
79+
"--browser",
80+
if is_linux_arm64() {
81+
"firefox"
82+
} else {
83+
"chrome"
84+
},
85+
"--output",
86+
"mixed",
7587
])
7688
.assert()
7789
.success()

0 commit comments

Comments
 (0)