[INFO] updating cached repository hwchen/reddit-focus [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/hwchen/reddit-focus [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/hwchen/reddit-focus" "work/ex/clippy-test-run/sources/stable/gh/hwchen/reddit-focus"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/hwchen/reddit-focus'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/hwchen/reddit-focus" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/hwchen/reddit-focus"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/hwchen/reddit-focus'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 13dfb0a8c058689bbc06a74d5f24c89af5cade5f [INFO] sha for GitHub repo hwchen/reddit-focus: 13dfb0a8c058689bbc06a74d5f24c89af5cade5f [INFO] validating manifest of hwchen/reddit-focus 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 hwchen/reddit-focus 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 hwchen/reddit-focus [INFO] finished frobbing hwchen/reddit-focus [INFO] frobbed toml for hwchen/reddit-focus written to work/ex/clippy-test-run/sources/stable/gh/hwchen/reddit-focus/Cargo.toml [INFO] started frobbing hwchen/reddit-focus [INFO] finished frobbing hwchen/reddit-focus [INFO] frobbed toml for hwchen/reddit-focus written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/hwchen/reddit-focus/Cargo.toml [INFO] crate hwchen/reddit-focus has a lockfile. skipping [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 hwchen/reddit-focus against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/hwchen/reddit-focus:/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" "-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] 43edca46bc1acc75a7e673c7da49e3a841cfdf190868bb134cb28a22d64a906f [INFO] running `"docker" "start" "-a" "43edca46bc1acc75a7e673c7da49e3a841cfdf190868bb134cb28a22d64a906f"` [INFO] [stderr] Checking itoa v0.4.0 [INFO] [stderr] Compiling backtrace-sys v0.1.16 [INFO] [stderr] Checking hyper-tls v0.1.3 [INFO] [stderr] Checking serde_json v1.0.12 [INFO] [stderr] Checking reqwest v0.8.5 [INFO] [stderr] Checking backtrace v0.3.5 [INFO] [stderr] Checking failure v0.1.1 [INFO] [stderr] Checking reddit-focus v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: unused variable: `after` [INFO] [stderr] --> src/main.rs:44:10 [INFO] [stderr] | [INFO] [stderr] 44 | let (after, new_posts) = get_new_posts(&client, &subreddit, token, n)?; [INFO] [stderr] | ^^^^^ help: consider using `_after` instead [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `after` [INFO] [stderr] --> src/main.rs:44:10 [INFO] [stderr] | [INFO] [stderr] 44 | let (after, new_posts) = get_new_posts(&client, &subreddit, token, n)?; [INFO] [stderr] | ^^^^^ help: consider using `_after` instead [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] [INFO] [stderr] warning: constant item is never used: `TOKEN_ENDPOINT` [INFO] [stderr] --> src/main.rs:13:1 [INFO] [stderr] | [INFO] [stderr] 13 | const TOKEN_ENDPOINT: &str = "https://www.reddit.com/api/v1/access_token"; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: constant item is never used: `CLIENT_ID` [INFO] [stderr] --> src/main.rs:15:1 [INFO] [stderr] | [INFO] [stderr] 15 | const CLIENT_ID: &str = "8YAYsOZ17tKZ_g"; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `get_token` [INFO] [stderr] --> src/main.rs:61:1 [INFO] [stderr] | [INFO] [stderr] 61 | fn get_token(client: &reqwest::Client, token_endpoint: &str, client_id: &str, secret: &str) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:30:10 [INFO] [stderr] | [INFO] [stderr] 30 | .ok_or(format_err!("please enter number of posts to get"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format_err!("please enter number of posts to get"))` [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: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)` [INFO] [stderr] --> src/main.rs:26:20 [INFO] [stderr] | [INFO] [stderr] 26 | let n: usize = args [INFO] [stderr] | ____________________^ [INFO] [stderr] 27 | | .by_ref() [INFO] [stderr] 28 | | .skip(1) [INFO] [stderr] 29 | | .next() [INFO] [stderr] | |_______________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_skip_next)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:32:33 [INFO] [stderr] | [INFO] [stderr] 32 | let subreddit = args.next().unwrap_or("rust".to_owned()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "rust".to_owned())` [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: constant item is never used: `TOKEN_ENDPOINT` [INFO] [stderr] --> src/main.rs:13:1 [INFO] [stderr] | [INFO] [stderr] 13 | const TOKEN_ENDPOINT: &str = "https://www.reddit.com/api/v1/access_token"; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: constant item is never used: `CLIENT_ID` [INFO] [stderr] --> src/main.rs:15:1 [INFO] [stderr] | [INFO] [stderr] 15 | const CLIENT_ID: &str = "8YAYsOZ17tKZ_g"; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `get_token` [INFO] [stderr] --> src/main.rs:61:1 [INFO] [stderr] | [INFO] [stderr] 61 | fn get_token(client: &reqwest::Client, token_endpoint: &str, client_id: &str, secret: &str) -> Result { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:30:10 [INFO] [stderr] | [INFO] [stderr] 30 | .ok_or(format_err!("please enter number of posts to get"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format_err!("please enter number of posts to get"))` [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: called `skip(x).next()` on an iterator. This is more succinctly expressed by calling `nth(x)` [INFO] [stderr] --> src/main.rs:26:20 [INFO] [stderr] | [INFO] [stderr] 26 | let n: usize = args [INFO] [stderr] | ____________________^ [INFO] [stderr] 27 | | .by_ref() [INFO] [stderr] 28 | | .skip(1) [INFO] [stderr] 29 | | .next() [INFO] [stderr] | |_______________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_skip_next)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:32:33 [INFO] [stderr] | [INFO] [stderr] 32 | let subreddit = args.next().unwrap_or("rust".to_owned()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "rust".to_owned())` [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] Finished dev [unoptimized + debuginfo] target(s) in 27.74s [INFO] running `"docker" "inspect" "43edca46bc1acc75a7e673c7da49e3a841cfdf190868bb134cb28a22d64a906f"` [INFO] running `"docker" "rm" "-f" "43edca46bc1acc75a7e673c7da49e3a841cfdf190868bb134cb28a22d64a906f"` [INFO] [stdout] 43edca46bc1acc75a7e673c7da49e3a841cfdf190868bb134cb28a22d64a906f