[INFO] crate website-icon-extract 0.3.0 is already in cache [INFO] extracting crate website-icon-extract 0.3.0 into work/ex/clippy-test-run/sources/stable/reg/website-icon-extract/0.3.0 [INFO] extracting crate website-icon-extract 0.3.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/website-icon-extract/0.3.0 [INFO] validating manifest of website-icon-extract-0.3.0 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 website-icon-extract-0.3.0 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 website-icon-extract-0.3.0 [INFO] finished frobbing website-icon-extract-0.3.0 [INFO] frobbed toml for website-icon-extract-0.3.0 written to work/ex/clippy-test-run/sources/stable/reg/website-icon-extract/0.3.0/Cargo.toml [INFO] started frobbing website-icon-extract-0.3.0 [INFO] finished frobbing website-icon-extract-0.3.0 [INFO] frobbed toml for website-icon-extract-0.3.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/website-icon-extract/0.3.0/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 website-icon-extract-0.3.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/website-icon-extract/0.3.0:/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] 537cd2b10df7c13fb0a46b2649c8b02c319228a0403d6421047260286dc17026 [INFO] running `"docker" "start" "-a" "537cd2b10df7c13fb0a46b2649c8b02c319228a0403d6421047260286dc17026"` [INFO] [stderr] Checking quick-xml v0.12.4 [INFO] [stderr] Checking website-icon-extract v0.3.0 (/opt/crater/workdir) [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/request.rs:69:5 [INFO] [stderr] | [INFO] [stderr] 69 | return Err(Box::new(RequestError::new("connection was not possible"))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Err(Box::new(RequestError::new("connection was not possible")))` [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/request.rs:75:5 [INFO] [stderr] | [INFO] [stderr] 75 | return Ok(abs_url.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(abs_url.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this if statement can be collapsed [INFO] [stderr] --> src/request.rs:94:17 [INFO] [stderr] | [INFO] [stderr] 94 | / if code == 301 || code == 302 { [INFO] [stderr] 95 | | if depth < 5{ [INFO] [stderr] 96 | | depth = depth + 1; [INFO] [stderr] 97 | | let l = r_unwrapped.get_header("location"); [INFO] [stderr] ... | [INFO] [stderr] 104 | | } [INFO] [stderr] 105 | | } [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] 94 | if (code == 301 || code == 302) && depth < 5 { [INFO] [stderr] 95 | depth = depth + 1; [INFO] [stderr] 96 | let l = r_unwrapped.get_header("location"); [INFO] [stderr] 97 | if l.is_some(){ [INFO] [stderr] 98 | let l = l.unwrap(); [INFO] [stderr] 99 | let l_unwrapped = normalize_url(url_str, &l)?; [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/request.rs:188:17 [INFO] [stderr] | [INFO] [stderr] 188 | return Ok(()); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(())` [INFO] [stderr] | [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/request.rs:216:17 [INFO] [stderr] | [INFO] [stderr] 216 | return Ok(()); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(())` [INFO] [stderr] | [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/request.rs:226:9 [INFO] [stderr] | [INFO] [stderr] 226 | return self.info.code; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `self.info.code` [INFO] [stderr] | [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/request.rs:289:13 [INFO] [stderr] | [INFO] [stderr] 289 | return Err(Box::new(RequestError::new("HTTP header missing"))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Err(Box::new(RequestError::new("HTTP header missing")))` [INFO] [stderr] | [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/lib.rs:56:13 [INFO] [stderr] | [INFO] [stderr] 56 | return false; [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove `return` as shown: `false` [INFO] [stderr] | [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/lib.rs:59:13 [INFO] [stderr] | [INFO] [stderr] 59 | return false; [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove `return` as shown: `false` [INFO] [stderr] | [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/lib.rs:67:5 [INFO] [stderr] | [INFO] [stderr] 67 | return Ok(abs_url.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(abs_url.to_string())` [INFO] [stderr] | [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/request.rs:69:5 [INFO] [stderr] | [INFO] [stderr] 69 | return Err(Box::new(RequestError::new("connection was not possible"))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Err(Box::new(RequestError::new("connection was not possible")))` [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/request.rs:75:5 [INFO] [stderr] | [INFO] [stderr] 75 | return Ok(abs_url.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(abs_url.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: this if statement can be collapsed [INFO] [stderr] --> src/request.rs:94:17 [INFO] [stderr] | [INFO] [stderr] 94 | / if code == 301 || code == 302 { [INFO] [stderr] 95 | | if depth < 5{ [INFO] [stderr] 96 | | depth = depth + 1; [INFO] [stderr] 97 | | let l = r_unwrapped.get_header("location"); [INFO] [stderr] ... | [INFO] [stderr] 104 | | } [INFO] [stderr] 105 | | } [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] 94 | if (code == 301 || code == 302) && depth < 5 { [INFO] [stderr] 95 | depth = depth + 1; [INFO] [stderr] 96 | let l = r_unwrapped.get_header("location"); [INFO] [stderr] 97 | if l.is_some(){ [INFO] [stderr] 98 | let l = l.unwrap(); [INFO] [stderr] 99 | let l_unwrapped = normalize_url(url_str, &l)?; [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/request.rs:188:17 [INFO] [stderr] | [INFO] [stderr] 188 | return Ok(()); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(())` [INFO] [stderr] | [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/request.rs:216:17 [INFO] [stderr] | [INFO] [stderr] 216 | return Ok(()); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(())` [INFO] [stderr] | [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/request.rs:226:9 [INFO] [stderr] | [INFO] [stderr] 226 | return self.info.code; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `self.info.code` [INFO] [stderr] | [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/request.rs:289:13 [INFO] [stderr] | [INFO] [stderr] 289 | return Err(Box::new(RequestError::new("HTTP header missing"))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Err(Box::new(RequestError::new("HTTP header missing")))` [INFO] [stderr] | [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/lib.rs:56:13 [INFO] [stderr] | [INFO] [stderr] 56 | return false; [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove `return` as shown: `false` [INFO] [stderr] | [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/lib.rs:59:13 [INFO] [stderr] | [INFO] [stderr] 59 | return false; [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove `return` as shown: `false` [INFO] [stderr] | [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/lib.rs:67:5 [INFO] [stderr] | [INFO] [stderr] 67 | return Ok(abs_url.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Ok(abs_url.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/request.rs:63:33 [INFO] [stderr] | [INFO] [stderr] 63 | Duration::from_secs(timeout as u64), [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try: `u64::from(timeout)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/request.rs:96:25 [INFO] [stderr] | [INFO] [stderr] 96 | depth = depth + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: replace it with: `depth += 1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/request.rs:116:14 [INFO] [stderr] | [INFO] [stderr] 116 | .ok_or(RequestError::new("illegal host name"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| RequestError::new("illegal host name"))` [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 `ok_or` followed by a function call [INFO] [stderr] --> src/request.rs:118:14 [INFO] [stderr] | [INFO] [stderr] 118 | .ok_or(RequestError::new("port unknown"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| RequestError::new("port unknown"))` [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: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/request.rs:123:58 [INFO] [stderr] | [INFO] [stderr] 123 | stream.set_read_timeout(Some(Duration::from_secs(timeout as u64)))?; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try: `u64::from(timeout)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/request.rs:128:13 [INFO] [stderr] | [INFO] [stderr] 128 | / let mut host_str = String::from(host); [INFO] [stderr] 129 | | if port != 443{ [INFO] [stderr] 130 | | host_str = format!("{}:{}",host,port); [INFO] [stderr] 131 | | } [INFO] [stderr] | |_____________^ help: it is more idiomatic to write: `let host_str = if port != 443 { $ crate :: fmt :: format ( format_args ! ( $ ( $ arg ) * ) ) } else { String::from(host) };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/request.rs:147:13 [INFO] [stderr] | [INFO] [stderr] 147 | / let mut host_str = String::from(host); [INFO] [stderr] 148 | | if port != 80{ [INFO] [stderr] 149 | | host_str = format!("{}:{}",host,port); [INFO] [stderr] 150 | | } [INFO] [stderr] | |_____________^ help: it is more idiomatic to write: `let host_str = if port != 80 { $ crate :: fmt :: format ( format_args ! ( $ ( $ arg ) * ) ) } else { String::from(host) };` [INFO] [stderr] | [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/request.rs:221:5 [INFO] [stderr] | [INFO] [stderr] 221 | / pub fn get_content<'a>(&'a self) -> &'a str { [INFO] [stderr] 222 | | &self.content [INFO] [stderr] 223 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/request.rs:265:9 [INFO] [stderr] | [INFO] [stderr] 265 | stream.write(request_str.as_bytes())?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/request.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | / match line.find(':') { [INFO] [stderr] 302 | | Some(index) => { [INFO] [stderr] 303 | | let (key, value) = line.split_at(index); [INFO] [stderr] 304 | | httpinfo.headers.insert( [INFO] [stderr] ... | [INFO] [stderr] 309 | | _ => {} [INFO] [stderr] 310 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 301 | if let Some(index) = line.find(':') { [INFO] [stderr] 302 | let (key, value) = line.split_at(index); [INFO] [stderr] 303 | httpinfo.headers.insert( [INFO] [stderr] 304 | String::from(key).to_lowercase(), [INFO] [stderr] 305 | String::from(value[1..].trim()), [INFO] [stderr] 306 | ); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:100:12 [INFO] [stderr] | [INFO] [stderr] 100 | names: &Vec, [INFO] [stderr] | ^^^^^^^^^^^^ help: change this to: `&[String]` [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] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `website-icon-extract`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/request.rs:63:33 [INFO] [stderr] | [INFO] [stderr] 63 | Duration::from_secs(timeout as u64), [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try: `u64::from(timeout)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/request.rs:96:25 [INFO] [stderr] | [INFO] [stderr] 96 | depth = depth + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: replace it with: `depth += 1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/request.rs:116:14 [INFO] [stderr] | [INFO] [stderr] 116 | .ok_or(RequestError::new("illegal host name"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| RequestError::new("illegal host name"))` [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 `ok_or` followed by a function call [INFO] [stderr] --> src/request.rs:118:14 [INFO] [stderr] | [INFO] [stderr] 118 | .ok_or(RequestError::new("port unknown"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| RequestError::new("port unknown"))` [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: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/request.rs:123:58 [INFO] [stderr] | [INFO] [stderr] 123 | stream.set_read_timeout(Some(Duration::from_secs(timeout as u64)))?; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try: `u64::from(timeout)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/request.rs:128:13 [INFO] [stderr] | [INFO] [stderr] 128 | / let mut host_str = String::from(host); [INFO] [stderr] 129 | | if port != 443{ [INFO] [stderr] 130 | | host_str = format!("{}:{}",host,port); [INFO] [stderr] 131 | | } [INFO] [stderr] | |_____________^ help: it is more idiomatic to write: `let host_str = if port != 443 { $ crate :: fmt :: format ( format_args ! ( $ ( $ arg ) * ) ) } else { String::from(host) };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/request.rs:147:13 [INFO] [stderr] | [INFO] [stderr] 147 | / let mut host_str = String::from(host); [INFO] [stderr] 148 | | if port != 80{ [INFO] [stderr] 149 | | host_str = format!("{}:{}",host,port); [INFO] [stderr] 150 | | } [INFO] [stderr] | |_____________^ help: it is more idiomatic to write: `let host_str = if port != 80 { $ crate :: fmt :: format ( format_args ! ( $ ( $ arg ) * ) ) } else { String::from(host) };` [INFO] [stderr] | [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/request.rs:221:5 [INFO] [stderr] | [INFO] [stderr] 221 | / pub fn get_content<'a>(&'a self) -> &'a str { [INFO] [stderr] 222 | | &self.content [INFO] [stderr] 223 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] error: handle written amount returned or use `Write::write_all` instead [INFO] [stderr] --> src/request.rs:265:9 [INFO] [stderr] | [INFO] [stderr] 265 | stream.write(request_str.as_bytes())?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/request.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | / match line.find(':') { [INFO] [stderr] 302 | | Some(index) => { [INFO] [stderr] 303 | | let (key, value) = line.split_at(index); [INFO] [stderr] 304 | | httpinfo.headers.insert( [INFO] [stderr] ... | [INFO] [stderr] 309 | | _ => {} [INFO] [stderr] 310 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 301 | if let Some(index) = line.find(':') { [INFO] [stderr] 302 | let (key, value) = line.split_at(index); [INFO] [stderr] 303 | httpinfo.headers.insert( [INFO] [stderr] 304 | String::from(key).to_lowercase(), [INFO] [stderr] 305 | String::from(value[1..].trim()), [INFO] [stderr] 306 | ); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:100:12 [INFO] [stderr] | [INFO] [stderr] 100 | names: &Vec, [INFO] [stderr] | ^^^^^^^^^^^^ help: change this to: `&[String]` [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] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `website-icon-extract`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "537cd2b10df7c13fb0a46b2649c8b02c319228a0403d6421047260286dc17026"` [INFO] running `"docker" "rm" "-f" "537cd2b10df7c13fb0a46b2649c8b02c319228a0403d6421047260286dc17026"` [INFO] [stdout] 537cd2b10df7c13fb0a46b2649c8b02c319228a0403d6421047260286dc17026