[INFO] crate git-brws 0.6.1 is already in cache [INFO] extracting crate git-brws 0.6.1 into work/ex/clippy-test-run/sources/stable/reg/git-brws/0.6.1 [INFO] extracting crate git-brws 0.6.1 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/git-brws/0.6.1 [INFO] validating manifest of git-brws-0.6.1 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of git-brws-0.6.1 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing git-brws-0.6.1 [INFO] finished frobbing git-brws-0.6.1 [INFO] frobbed toml for git-brws-0.6.1 written to work/ex/clippy-test-run/sources/stable/reg/git-brws/0.6.1/Cargo.toml [INFO] started frobbing git-brws-0.6.1 [INFO] finished frobbing git-brws-0.6.1 [INFO] frobbed toml for git-brws-0.6.1 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/git-brws/0.6.1/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting git-brws-0.6.1 against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/git-brws/0.6.1:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dclippy::into_iter_on_array" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 884985b352dd3bdeb41b11ed4bc5c58255208add798e1d1d0824ebe5f28be639 [INFO] running `"docker" "start" "-a" "884985b352dd3bdeb41b11ed4bc5c58255208add798e1d1d0824ebe5f28be639"` [INFO] [stderr] Checking git-brws v0.6.1 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/argv.rs:111:9 [INFO] [stderr] | [INFO] [stderr] 111 | repo: repo, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `repo` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/argv.rs:113:9 [INFO] [stderr] | [INFO] [stderr] 113 | git_dir: git_dir, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `git_dir` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/git.rs:80:14 [INFO] [stderr] | [INFO] [stderr] 80 | Ok(Git { command: command, git_dir: path }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `command` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/page.rs:36:13 [INFO] [stderr] | [INFO] [stderr] 36 | hash: hash, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `hash` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/page.rs:92:13 [INFO] [stderr] | [INFO] [stderr] 92 | relative_path: relative_path, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `relative_path` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/page.rs:94:13 [INFO] [stderr] | [INFO] [stderr] 94 | line: line, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `line` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/page.rs:103:9 [INFO] [stderr] | [INFO] [stderr] 103 | cfg: cfg, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `cfg` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/argv.rs:111:9 [INFO] [stderr] | [INFO] [stderr] 111 | repo: repo, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `repo` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/argv.rs:113:9 [INFO] [stderr] | [INFO] [stderr] 113 | git_dir: git_dir, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `git_dir` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/git.rs:80:14 [INFO] [stderr] | [INFO] [stderr] 80 | Ok(Git { command: command, git_dir: path }) [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `command` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/page.rs:36:13 [INFO] [stderr] | [INFO] [stderr] 36 | hash: hash, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `hash` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/page.rs:92:13 [INFO] [stderr] | [INFO] [stderr] 92 | relative_path: relative_path, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `relative_path` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/page.rs:94:13 [INFO] [stderr] | [INFO] [stderr] 94 | line: line, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `line` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/page.rs:103:9 [INFO] [stderr] | [INFO] [stderr] 103 | cfg: cfg, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `cfg` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/command.rs:26:20 [INFO] [stderr] | [INFO] [stderr] 26 | } else { [INFO] [stderr] | ____________________^ [INFO] [stderr] 27 | | if let Some(code) = status.code() { [INFO] [stderr] 28 | | Some(format!("Error on opening URL {}: Command exited with non-zero status {}", url, code)) [INFO] [stderr] 29 | | } else { [INFO] [stderr] 30 | | Some(format!("Error on opening URL {}: Command terminated by signal", url)) [INFO] [stderr] 31 | | } [INFO] [stderr] 32 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 26 | } else if let Some(code) = status.code() { [INFO] [stderr] 27 | Some(format!("Error on opening URL {}: Command exited with non-zero status {}", url, code)) [INFO] [stderr] 28 | } else { [INFO] [stderr] 29 | Some(format!("Error on opening URL {}: Command terminated by signal", url)) [INFO] [stderr] 30 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/command.rs:26:20 [INFO] [stderr] | [INFO] [stderr] 26 | } else { [INFO] [stderr] | ____________________^ [INFO] [stderr] 27 | | if let Some(code) = status.code() { [INFO] [stderr] 28 | | Some(format!("Error on opening URL {}: Command exited with non-zero status {}", url, code)) [INFO] [stderr] 29 | | } else { [INFO] [stderr] 30 | | Some(format!("Error on opening URL {}: Command terminated by signal", url)) [INFO] [stderr] 31 | | } [INFO] [stderr] 32 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 26 | } else if let Some(code) = status.code() { [INFO] [stderr] 27 | Some(format!("Error on opening URL {}: Command exited with non-zero status {}", url, code)) [INFO] [stderr] 28 | } else { [INFO] [stderr] 29 | Some(format!("Error on opening URL {}: Command terminated by signal", url)) [INFO] [stderr] 30 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/test/page.rs:57:29 [INFO] [stderr] | [INFO] [stderr] 57 | Page::FileOrDir{relative_path: _, hash: _, line} => { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/test/page.rs:57:47 [INFO] [stderr] | [INFO] [stderr] 57 | Page::FileOrDir{relative_path: _, hash: _, line} => { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `FileOrDir { line, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/argv.rs:48:19 [INFO] [stderr] | [INFO] [stderr] 48 | fn usage(program: &String) -> String { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/git.rs:54:29 [INFO] [stderr] | [INFO] [stderr] 54 | match out.splitn(2, "/").next() { [INFO] [stderr] | ^^^ help: try using a char instead: `'/'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/git.rs:68:22 [INFO] [stderr] | [INFO] [stderr] 68 | .ok_or(format!("Cannot locate root directory from git-dir '{}'", self.git_dir))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Cannot locate root directory from git-dir '{}'", self.git_dir))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/git.rs:74:38 [INFO] [stderr] | [INFO] [stderr] 74 | env::var("GIT_BRWS_GIT_COMMAND").unwrap_or("git".to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "git".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/git.rs:79:29 [INFO] [stderr] | [INFO] [stderr] 79 | let path = dir.to_str().ok_or(format!("Failed to retrieve directory path as UTF8 string: {:?}", dir))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Failed to retrieve directory path as UTF8 string: {:?}", dir))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/page.rs:47:32 [INFO] [stderr] | [INFO] [stderr] 47 | let rhs = split.next().ok_or(format!(" Diff format must be specified as LHS..RHS but found {}", self.cfg.args[0]))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!(" Diff format must be specified as LHS..RHS but found {}", self.cfg.args[0]))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/service.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | / match page { [INFO] [stderr] 12 | | &Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] 13 | | format!("https://{}/{}/{}/tree/{}", host, user, repo, b) [INFO] [stderr] 14 | | } else { [INFO] [stderr] ... | [INFO] [stderr] 20 | | &Page::FileOrDir {ref relative_path, ref hash, line: Some(line)} => format!("https://{}/{}/{}/blob/{}/{}#L{}", host, user, repo, hash, relative_path, line), [INFO] [stderr] 21 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 11 | match *page { [INFO] [stderr] 12 | Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] 13 | format!("https://{}/{}/{}/tree/{}", host, user, repo, b) [INFO] [stderr] 14 | } else { [INFO] [stderr] 15 | format!("https://{}/{}/{}", host, user, repo) [INFO] [stderr] 16 | }, [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/service.rs:12:24 [INFO] [stderr] | [INFO] [stderr] 12 | &Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] | ________________________^ [INFO] [stderr] 13 | | format!("https://{}/{}/{}/tree/{}", host, user, repo, b) [INFO] [stderr] 14 | | } else { [INFO] [stderr] 15 | | format!("https://{}/{}/{}", host, user, repo) [INFO] [stderr] 16 | | }, [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 12 | &Page::Open => if let Some(ref b) = *branch { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/service.rs:34:5 [INFO] [stderr] | [INFO] [stderr] 34 | / match page { [INFO] [stderr] 35 | | &Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] 36 | | Ok(format!("https://bitbucket.org/{}/{}/branch/{}", user, repo, b)) [INFO] [stderr] 37 | | } else { [INFO] [stderr] ... | [INFO] [stderr] 50 | | }, [INFO] [stderr] 51 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 34 | match *page { [INFO] [stderr] 35 | Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] 36 | Ok(format!("https://bitbucket.org/{}/{}/branch/{}", user, repo, b)) [INFO] [stderr] 37 | } else { [INFO] [stderr] 38 | Ok(format!("https://bitbucket.org/{}/{}", user, repo)) [INFO] [stderr] 39 | }, [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/service.rs:35:24 [INFO] [stderr] | [INFO] [stderr] 35 | &Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] | ________________________^ [INFO] [stderr] 36 | | Ok(format!("https://bitbucket.org/{}/{}/branch/{}", user, repo, b)) [INFO] [stderr] 37 | | } else { [INFO] [stderr] 38 | | Ok(format!("https://bitbucket.org/{}/{}", user, repo)) [INFO] [stderr] 39 | | }, [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 35 | &Page::Open => if let Some(ref b) = *branch { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:48:18 [INFO] [stderr] | [INFO] [stderr] 48 | .ok_or(format!("Cannot convert path to UTF8 string: {}", relative_path))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Cannot convert path to UTF8 string: {}", relative_path))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:46:18 [INFO] [stderr] | [INFO] [stderr] 46 | .ok_or(format!("Cannot get file name from path: {}", relative_path))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Cannot get file name from path: {}", relative_path))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:57:29 [INFO] [stderr] | [INFO] [stderr] 57 | let user = split.next().ok_or(format!("Can't detect user name from path {}", path))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Can't detect user name from path {}", path))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:58:33 [INFO] [stderr] | [INFO] [stderr] 58 | let mut repo = split.next().ok_or(format!("Can't detect repository name from path {}", path))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Can't detect repository name from path {}", path))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/service.rs:69:39 [INFO] [stderr] | [INFO] [stderr] 69 | pub fn parse_and_build_page_url(repo: &String, page: &Page, branch: &Option) -> util::Result { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:73:31 [INFO] [stderr] | [INFO] [stderr] 73 | let host = url.host_str().ok_or(format!("Failed to parse host from {}", repo))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Failed to parse host from {}", repo))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/argv.rs:48:19 [INFO] [stderr] | [INFO] [stderr] 48 | fn usage(program: &String) -> String { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/git.rs:54:29 [INFO] [stderr] | [INFO] [stderr] 54 | match out.splitn(2, "/").next() { [INFO] [stderr] | ^^^ help: try using a char instead: `'/'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/git.rs:68:22 [INFO] [stderr] | [INFO] [stderr] 68 | .ok_or(format!("Cannot locate root directory from git-dir '{}'", self.git_dir))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Cannot locate root directory from git-dir '{}'", self.git_dir))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/git.rs:74:38 [INFO] [stderr] | [INFO] [stderr] 74 | env::var("GIT_BRWS_GIT_COMMAND").unwrap_or("git".to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| "git".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/git.rs:79:29 [INFO] [stderr] | [INFO] [stderr] 79 | let path = dir.to_str().ok_or(format!("Failed to retrieve directory path as UTF8 string: {:?}", dir))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Failed to retrieve directory path as UTF8 string: {:?}", dir))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/page.rs:47:32 [INFO] [stderr] | [INFO] [stderr] 47 | let rhs = split.next().ok_or(format!(" Diff format must be specified as LHS..RHS but found {}", self.cfg.args[0]))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!(" Diff format must be specified as LHS..RHS but found {}", self.cfg.args[0]))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/service.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | / match page { [INFO] [stderr] 12 | | &Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] 13 | | format!("https://{}/{}/{}/tree/{}", host, user, repo, b) [INFO] [stderr] 14 | | } else { [INFO] [stderr] ... | [INFO] [stderr] 20 | | &Page::FileOrDir {ref relative_path, ref hash, line: Some(line)} => format!("https://{}/{}/{}/blob/{}/{}#L{}", host, user, repo, hash, relative_path, line), [INFO] [stderr] 21 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 11 | match *page { [INFO] [stderr] 12 | Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] 13 | format!("https://{}/{}/{}/tree/{}", host, user, repo, b) [INFO] [stderr] 14 | } else { [INFO] [stderr] 15 | format!("https://{}/{}/{}", host, user, repo) [INFO] [stderr] 16 | }, [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/service.rs:12:24 [INFO] [stderr] | [INFO] [stderr] 12 | &Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] | ________________________^ [INFO] [stderr] 13 | | format!("https://{}/{}/{}/tree/{}", host, user, repo, b) [INFO] [stderr] 14 | | } else { [INFO] [stderr] 15 | | format!("https://{}/{}/{}", host, user, repo) [INFO] [stderr] 16 | | }, [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 12 | &Page::Open => if let Some(ref b) = *branch { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/service.rs:34:5 [INFO] [stderr] | [INFO] [stderr] 34 | / match page { [INFO] [stderr] 35 | | &Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] 36 | | Ok(format!("https://bitbucket.org/{}/{}/branch/{}", user, repo, b)) [INFO] [stderr] 37 | | } else { [INFO] [stderr] ... | [INFO] [stderr] 50 | | }, [INFO] [stderr] 51 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 34 | match *page { [INFO] [stderr] 35 | Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] 36 | Ok(format!("https://bitbucket.org/{}/{}/branch/{}", user, repo, b)) [INFO] [stderr] 37 | } else { [INFO] [stderr] 38 | Ok(format!("https://bitbucket.org/{}/{}", user, repo)) [INFO] [stderr] 39 | }, [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/service.rs:35:24 [INFO] [stderr] | [INFO] [stderr] 35 | &Page::Open => if let &Some(ref b) = branch { [INFO] [stderr] | ________________________^ [INFO] [stderr] 36 | | Ok(format!("https://bitbucket.org/{}/{}/branch/{}", user, repo, b)) [INFO] [stderr] 37 | | } else { [INFO] [stderr] 38 | | Ok(format!("https://bitbucket.org/{}/{}", user, repo)) [INFO] [stderr] 39 | | }, [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 35 | &Page::Open => if let Some(ref b) = *branch { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:48:18 [INFO] [stderr] | [INFO] [stderr] 48 | .ok_or(format!("Cannot convert path to UTF8 string: {}", relative_path))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Cannot convert path to UTF8 string: {}", relative_path))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:46:18 [INFO] [stderr] | [INFO] [stderr] 46 | .ok_or(format!("Cannot get file name from path: {}", relative_path))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Cannot get file name from path: {}", relative_path))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:57:29 [INFO] [stderr] | [INFO] [stderr] 57 | let user = split.next().ok_or(format!("Can't detect user name from path {}", path))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Can't detect user name from path {}", path))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:58:33 [INFO] [stderr] | [INFO] [stderr] 58 | let mut repo = split.next().ok_or(format!("Can't detect repository name from path {}", path))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Can't detect repository name from path {}", path))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/service.rs:69:39 [INFO] [stderr] | [INFO] [stderr] 69 | pub fn parse_and_build_page_url(repo: &String, page: &Page, branch: &Option) -> util::Result { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/service.rs:73:31 [INFO] [stderr] | [INFO] [stderr] 73 | let host = url.host_str().ok_or(format!("Failed to parse host from {}", repo))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format!("Failed to parse host from {}", repo))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/test/argv.rs:25:36 [INFO] [stderr] | [INFO] [stderr] 25 | .any(|u| o.repo == u.to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^ help: try: `*u` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cmp_owned)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.59s [INFO] running `"docker" "inspect" "884985b352dd3bdeb41b11ed4bc5c58255208add798e1d1d0824ebe5f28be639"` [INFO] running `"docker" "rm" "-f" "884985b352dd3bdeb41b11ed4bc5c58255208add798e1d1d0824ebe5f28be639"` [INFO] [stdout] 884985b352dd3bdeb41b11ed4bc5c58255208add798e1d1d0824ebe5f28be639