[INFO] crate kubernetes 0.2.0 is already in cache [INFO] extracting crate kubernetes 0.2.0 into work/ex/clippy-test-run/sources/stable/reg/kubernetes/0.2.0 [INFO] extracting crate kubernetes 0.2.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/kubernetes/0.2.0 [INFO] validating manifest of kubernetes-0.2.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 kubernetes-0.2.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 kubernetes-0.2.0 [INFO] finished frobbing kubernetes-0.2.0 [INFO] frobbed toml for kubernetes-0.2.0 written to work/ex/clippy-test-run/sources/stable/reg/kubernetes/0.2.0/Cargo.toml [INFO] started frobbing kubernetes-0.2.0 [INFO] finished frobbing kubernetes-0.2.0 [INFO] frobbed toml for kubernetes-0.2.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/kubernetes/0.2.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 kubernetes-0.2.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/kubernetes/0.2.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] 66fa84bf5a955b469dac0ae9d50d8d8ee0d848c66c768b8120de79064d574a6c [INFO] running `"docker" "start" "-a" "66fa84bf5a955b469dac0ae9d50d8d8ee0d848c66c768b8120de79064d574a6c"` [INFO] [stderr] Checking kubernetes v0.2.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client/config/mod.rs:19:19 [INFO] [stderr] | [INFO] [stderr] 19 | ConfigError { msg: msg } [INFO] [stderr] | ^^^^^^^^ help: replace it with: `msg` [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/client/resplit.rs:28:9 [INFO] [stderr] | [INFO] [stderr] 28 | predicate: predicate, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `predicate` [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/client/mod.rs:45:30 [INFO] [stderr] | [INFO] [stderr] 45 | RequiredAttributeError { attr: attr } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `attr` [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/client/mod.rs:113:13 [INFO] [stderr] | [INFO] [stderr] 113 | config: config, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `config` [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/groupversion.rs:79:13 [INFO] [stderr] | [INFO] [stderr] 79 | kind: kind, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `kind` [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/client/config/mod.rs:19:19 [INFO] [stderr] | [INFO] [stderr] 19 | ConfigError { msg: msg } [INFO] [stderr] | ^^^^^^^^ help: replace it with: `msg` [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/client/resplit.rs:28:9 [INFO] [stderr] | [INFO] [stderr] 28 | predicate: predicate, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `predicate` [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/client/mod.rs:45:30 [INFO] [stderr] | [INFO] [stderr] 45 | RequiredAttributeError { attr: attr } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `attr` [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/client/mod.rs:113:13 [INFO] [stderr] | [INFO] [stderr] 113 | config: config, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `config` [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/groupversion.rs:79:13 [INFO] [stderr] | [INFO] [stderr] 79 | kind: kind, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `kind` [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: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/api/mod.rs:21:24 [INFO] [stderr] | [INFO] [stderr] 21 | pub const JSON_PATCH: &'static str = "application/json-patch+json"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/api/mod.rs:22:25 [INFO] [stderr] | [INFO] [stderr] 22 | pub const MERGE_PATCH: &'static str = "application/merge-patch+json"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/api/mod.rs:23:35 [INFO] [stderr] | [INFO] [stderr] 23 | pub const STRATEGIC_MERGE_PATCH: &'static str = "application/strategic-merge-patch+json"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/api/mod.rs:21:24 [INFO] [stderr] | [INFO] [stderr] 21 | pub const JSON_PATCH: &'static str = "application/json-patch+json"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/api/mod.rs:22:25 [INFO] [stderr] | [INFO] [stderr] 22 | pub const MERGE_PATCH: &'static str = "application/merge-patch+json"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/api/mod.rs:23:35 [INFO] [stderr] | [INFO] [stderr] 23 | pub const STRATEGIC_MERGE_PATCH: &'static str = "application/strategic-merge-patch+json"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/api/intstr.rs:20:14 [INFO] [stderr] | [INFO] [stderr] 20 | .unwrap_or(IntOrString::String(s)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| IntOrString::String(s))` [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/api/intstr.rs:20:14 [INFO] [stderr] | [INFO] [stderr] 20 | .unwrap_or(IntOrString::String(s)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| IntOrString::String(s))` [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: length comparison to zero [INFO] [stderr] --> src/client/config/mod.rs:40:18 [INFO] [stderr] | [INFO] [stderr] 40 | let ret = if data.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!data.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/client/config/mod.rs:42:15 [INFO] [stderr] | [INFO] [stderr] 42 | } else if file.as_os_str().len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!file.as_os_str().is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/client/config/mod.rs:76:14 [INFO] [stderr] | [INFO] [stderr] 76 | .ok_or(config_err("context doesn't exist"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| config_err("context doesn't exist"))` [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/client/config/mod.rs:82:14 [INFO] [stderr] | [INFO] [stderr] 82 | .ok_or(config_err("context cluster doesn't exist"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| config_err("context cluster doesn't exist"))` [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/client/config/mod.rs:88:14 [INFO] [stderr] | [INFO] [stderr] 88 | .ok_or(config_err("context user doesn't exist"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| config_err("context user doesn't exist"))` [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: length comparison to zero [INFO] [stderr] --> src/client/resplit.rs:73:20 [INFO] [stderr] | [INFO] [stderr] 73 | if self.buf.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!self.buf.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/client/resplit.rs:92:31 [INFO] [stderr] | [INFO] [stderr] 92 | return if self.buf.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!self.buf.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/client/mod.rs:65:14 [INFO] [stderr] | [INFO] [stderr] 65 | .ok_or(format_err!("Unable to find config"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format_err!("Unable to find config"))` [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/client/mod.rs:308:47 [INFO] [stderr] | [INFO] [stderr] 308 | let name = metadata.name.as_ref().ok_or(required_attr("name"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| required_attr("name"))` [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/client/mod.rs:338:47 [INFO] [stderr] | [INFO] [stderr] 338 | let name = metadata.name.as_ref().ok_or(required_attr("name"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| required_attr("name"))` [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: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/groupversion.rs:57:5 [INFO] [stderr] | [INFO] [stderr] 57 | / pub fn from_str(s: &'a str) -> Result { [INFO] [stderr] 58 | | let (g, v) = match s.find('/') { [INFO] [stderr] 59 | | None => ("", s), [INFO] [stderr] 60 | | Some(i) => { [INFO] [stderr] ... | [INFO] [stderr] 72 | | }) [INFO] [stderr] 73 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/groupversion.rs:200:5 [INFO] [stderr] | [INFO] [stderr] 200 | / pub fn from_str(s: &'a str) -> Result { [INFO] [stderr] 201 | | let (g, r) = match s.find('.') { [INFO] [stderr] 202 | | None => ("", s), [INFO] [stderr] 203 | | Some(i) => { [INFO] [stderr] ... | [INFO] [stderr] 211 | | }) [INFO] [stderr] 212 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:55:22 [INFO] [stderr] | [INFO] [stderr] 55 | self.items().into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/client/config/mod.rs:40:18 [INFO] [stderr] | [INFO] [stderr] 40 | let ret = if data.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!data.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/client/config/mod.rs:42:15 [INFO] [stderr] | [INFO] [stderr] 42 | } else if file.as_os_str().len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!file.as_os_str().is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/client/config/mod.rs:76:14 [INFO] [stderr] | [INFO] [stderr] 76 | .ok_or(config_err("context doesn't exist"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| config_err("context doesn't exist"))` [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/client/config/mod.rs:82:14 [INFO] [stderr] | [INFO] [stderr] 82 | .ok_or(config_err("context cluster doesn't exist"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| config_err("context cluster doesn't exist"))` [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/client/config/mod.rs:88:14 [INFO] [stderr] | [INFO] [stderr] 88 | .ok_or(config_err("context user doesn't exist"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| config_err("context user doesn't exist"))` [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: length comparison to zero [INFO] [stderr] --> src/client/resplit.rs:73:20 [INFO] [stderr] | [INFO] [stderr] 73 | if self.buf.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!self.buf.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/client/resplit.rs:92:31 [INFO] [stderr] | [INFO] [stderr] 92 | return if self.buf.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!self.buf.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/client/mod.rs:65:14 [INFO] [stderr] | [INFO] [stderr] 65 | .ok_or(format_err!("Unable to find config"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| format_err!("Unable to find config"))` [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/client/mod.rs:308:47 [INFO] [stderr] | [INFO] [stderr] 308 | let name = metadata.name.as_ref().ok_or(required_attr("name"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| required_attr("name"))` [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/client/mod.rs:338:47 [INFO] [stderr] | [INFO] [stderr] 338 | let name = metadata.name.as_ref().ok_or(required_attr("name"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| required_attr("name"))` [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: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/groupversion.rs:57:5 [INFO] [stderr] | [INFO] [stderr] 57 | / pub fn from_str(s: &'a str) -> Result { [INFO] [stderr] 58 | | let (g, v) = match s.find('/') { [INFO] [stderr] 59 | | None => ("", s), [INFO] [stderr] 60 | | Some(i) => { [INFO] [stderr] ... | [INFO] [stderr] 72 | | }) [INFO] [stderr] 73 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/groupversion.rs:200:5 [INFO] [stderr] | [INFO] [stderr] 200 | / pub fn from_str(s: &'a str) -> Result { [INFO] [stderr] 201 | | let (g, r) = match s.find('.') { [INFO] [stderr] 202 | | None => ("", s), [INFO] [stderr] 203 | | Some(i) => { [INFO] [stderr] ... | [INFO] [stderr] 211 | | }) [INFO] [stderr] 212 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/lib.rs:55:22 [INFO] [stderr] | [INFO] [stderr] 55 | self.items().into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: using `println!("")` [INFO] [stderr] --> examples/client-watch.rs:55:17 [INFO] [stderr] | [INFO] [stderr] 55 | println!(""); [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `println!()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::println_empty_string)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stderr] [INFO] [stderr] warning: using `println!("")` [INFO] [stderr] --> examples/client-watch.rs:65:21 [INFO] [stderr] | [INFO] [stderr] 65 | println!(""); [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `println!()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> examples/client.rs:35:38 [INFO] [stderr] | [INFO] [stderr] 35 | .map(|pod| pod.metadata.name.unwrap_or("(no name)".into())) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "(no name)".into())` [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 `or` followed by a function call [INFO] [stderr] --> examples/client-watch.rs:45:26 [INFO] [stderr] | [INFO] [stderr] 45 | .or(s.reason.as_ref()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| s.reason.as_ref())` [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] --> examples/client-watch.rs:103:68 [INFO] [stderr] | [INFO] [stderr] 103 | println!("deleted {}", p.metadata.name.unwrap_or("(no name)".into())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "(no name)".into())` [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 39.26s [INFO] running `"docker" "inspect" "66fa84bf5a955b469dac0ae9d50d8d8ee0d848c66c768b8120de79064d574a6c"` [INFO] running `"docker" "rm" "-f" "66fa84bf5a955b469dac0ae9d50d8d8ee0d848c66c768b8120de79064d574a6c"` [INFO] [stdout] 66fa84bf5a955b469dac0ae9d50d8d8ee0d848c66c768b8120de79064d574a6c