Skip to content

Commit b0219e5

Browse files
qryxipamodm
authored andcommitted
Run clippy
1 parent 62fae72 commit b0219e5

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ matrix:
1818
- cargo update
1919
- cargo test --all --locked --verbose
2020
- cargo doc --verbose
21-
- rustup component add rustfmt
21+
- rustup component add clippy rustfmt
22+
- cargo clippy --all-targets -- -D warnings
2223
- cargo fmt --all -- --check
2324

2425
- rust: nightly
2526
script:
2627
- cargo update
2728
- cargo test --locked
28-
- rustup component add rustfmt
29+
- rustup component add clippy rustfmt
30+
- cargo clippy --all-targets -- -D warnings
2931
- cargo fmt --all -- --check
3032

3133
branches:

src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,8 @@ fn open_browser_internal(browser: Browser, url: &str) -> Result<Output> {
259259
/// Open on Linux using the $BROWSER env var
260260
#[cfg(target_os = "linux")]
261261
fn open_on_linux_using_browser_env(url: &str) -> Result<Output> {
262-
let browsers = ::std::env::var("BROWSER").map_err(|_| -> Error {
263-
Error::new(ErrorKind::NotFound, format!("BROWSER env not set"))
264-
})?;
262+
let browsers = ::std::env::var("BROWSER")
263+
.map_err(|_| -> Error { Error::new(ErrorKind::NotFound, "BROWSER env not set") })?;
265264
for browser in browsers.split(':') {
266265
// $BROWSER can contain ':' delimited options, each representing a potential browser command line
267266
if !browser.is_empty() {
@@ -285,10 +284,10 @@ fn open_on_linux_using_browser_env(url: &str) -> Result<Output> {
285284
}
286285
}
287286
}
288-
return Err(Error::new(
287+
Err(Error::new(
289288
ErrorKind::NotFound,
290289
"No valid command in $BROWSER",
291-
));
290+
))
292291
}
293292

294293
#[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))]

0 commit comments

Comments
 (0)