[INFO] updating cached repository GitSquared/ipapi [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/GitSquared/ipapi [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/GitSquared/ipapi" "work/ex/clippy-test-run/sources/stable/gh/GitSquared/ipapi"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/GitSquared/ipapi'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/GitSquared/ipapi" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/GitSquared/ipapi"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/GitSquared/ipapi'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 6eac5af4f2d156c988b0e956d17df52e56eab981 [INFO] sha for GitHub repo GitSquared/ipapi: 6eac5af4f2d156c988b0e956d17df52e56eab981 [INFO] validating manifest of GitSquared/ipapi 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 GitSquared/ipapi 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 GitSquared/ipapi [INFO] finished frobbing GitSquared/ipapi [INFO] frobbed toml for GitSquared/ipapi written to work/ex/clippy-test-run/sources/stable/gh/GitSquared/ipapi/Cargo.toml [INFO] started frobbing GitSquared/ipapi [INFO] finished frobbing GitSquared/ipapi [INFO] frobbed toml for GitSquared/ipapi written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/GitSquared/ipapi/Cargo.toml [INFO] crate GitSquared/ipapi 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 GitSquared/ipapi against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/GitSquared/ipapi:/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] 00ccc0f75662cb9d6896ee6ef841e62084ad8d9729f35d1483e9f8ee24ef7b2e [INFO] running `"docker" "start" "-a" "00ccc0f75662cb9d6896ee6ef841e62084ad8d9729f35d1483e9f8ee24ef7b2e"` [INFO] [stderr] Checking filetime v0.2.4 [INFO] [stderr] Checking base64 v0.9.3 [INFO] [stderr] Checking buf_redux v0.6.3 [INFO] [stderr] Checking twoway v0.1.8 [INFO] [stderr] Checking brotli-sys v0.3.2 [INFO] [stderr] Checking chrono v0.4.5 [INFO] [stderr] Checking gzip-header v0.1.2 [INFO] [stderr] Checking maxminddb v0.11.0 [INFO] [stderr] Checking deflate v0.7.18 [INFO] [stderr] Checking brotli2 v0.3.2 [INFO] [stderr] Checking multipart v0.13.6 [INFO] [stderr] Checking tiny_http v0.6.0 [INFO] [stderr] Checking rouille v2.2.0 [INFO] [stderr] Checking ipapi v2.0.0 (/opt/crater/workdir) [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:45:9 [INFO] [stderr] | [INFO] [stderr] 45 | return Response::json(&json!({"ip": "localhost"})).with_status_code(400); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Response::json(&json!({"ip": "localhost"})).with_status_code(400)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:60:9 [INFO] [stderr] | [INFO] [stderr] 60 | / return Response::json(&json!({ [INFO] [stderr] 61 | | "ip": ip, [INFO] [stderr] 62 | | "geo": city.location, [INFO] [stderr] 63 | | "time": timestamp.as_secs(), [INFO] [stderr] 64 | | "api_version": "3.0.0" [INFO] [stderr] 65 | | })).with_unique_header("cache-control", "s-maxage=172800, maxage=0"); [INFO] [stderr] | |_____________________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 60 | Response::json(&json!({ [INFO] [stderr] 61 | "ip": ip, [INFO] [stderr] 62 | "geo": city.location, [INFO] [stderr] 63 | "time": timestamp.as_secs(), [INFO] [stderr] 64 | "api_version": "3.0.0" [INFO] [stderr] 65 | })).with_unique_header("cache-control", "s-maxage=172800, maxage=0") [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:22:92 [INFO] [stderr] | [INFO] [stderr] 22 | let ip = IpAddr::from_str(request.header("x-forwarded-for").unwrap_or("")).unwrap_or(request.remote_addr().ip()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| request.remote_addr().ip())` [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: unneeded return statement [INFO] [stderr] --> src/main.rs:45:9 [INFO] [stderr] | [INFO] [stderr] 45 | return Response::json(&json!({"ip": "localhost"})).with_status_code(400); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Response::json(&json!({"ip": "localhost"})).with_status_code(400)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:60:9 [INFO] [stderr] | [INFO] [stderr] 60 | / return Response::json(&json!({ [INFO] [stderr] 61 | | "ip": ip, [INFO] [stderr] 62 | | "geo": city.location, [INFO] [stderr] 63 | | "time": timestamp.as_secs(), [INFO] [stderr] 64 | | "api_version": "3.0.0" [INFO] [stderr] 65 | | })).with_unique_header("cache-control", "s-maxage=172800, maxage=0"); [INFO] [stderr] | |_____________________________________________________________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 60 | Response::json(&json!({ [INFO] [stderr] 61 | "ip": ip, [INFO] [stderr] 62 | "geo": city.location, [INFO] [stderr] 63 | "time": timestamp.as_secs(), [INFO] [stderr] 64 | "api_version": "3.0.0" [INFO] [stderr] 65 | })).with_unique_header("cache-control", "s-maxage=172800, maxage=0") [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/main.rs:22:92 [INFO] [stderr] | [INFO] [stderr] 22 | let ip = IpAddr::from_str(request.header("x-forwarded-for").unwrap_or("")).unwrap_or(request.remote_addr().ip()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| request.remote_addr().ip())` [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] Finished dev [unoptimized + debuginfo] target(s) in 21.85s [INFO] running `"docker" "inspect" "00ccc0f75662cb9d6896ee6ef841e62084ad8d9729f35d1483e9f8ee24ef7b2e"` [INFO] running `"docker" "rm" "-f" "00ccc0f75662cb9d6896ee6ef841e62084ad8d9729f35d1483e9f8ee24ef7b2e"` [INFO] [stdout] 00ccc0f75662cb9d6896ee6ef841e62084ad8d9729f35d1483e9f8ee24ef7b2e