[INFO] cloning repository https://github.com/hsiatein/cmago [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/hsiatein/cmago" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhsiatein%2Fcmago", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhsiatein%2Fcmago'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 95c1d63fbf6f801abab11522494318123e49df6e [INFO] linting hsiatein/cmago against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhsiatein%2Fcmago" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/hsiatein/cmago [INFO] finished tweaking git repo https://github.com/hsiatein/cmago [INFO] tweaked toml for git repo https://github.com/hsiatein/cmago written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/hsiatein/cmago on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/hsiatein/cmago already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded argparse v0.2.2 [INFO] [stderr] Downloaded proc-macro2 v1.0.96 [INFO] [stderr] Downloaded clap v4.5.43 [INFO] [stderr] Downloaded clap_builder v4.5.43 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 162cc5e864ab177573d25cd4a9d9f73b40c93c1dbbc378696c2b5e7770ee415d [INFO] running `Command { std: "docker" "start" "-a" "162cc5e864ab177573d25cd4a9d9f73b40c93c1dbbc378696c2b5e7770ee415d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "162cc5e864ab177573d25cd4a9d9f73b40c93c1dbbc378696c2b5e7770ee415d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "162cc5e864ab177573d25cd4a9d9f73b40c93c1dbbc378696c2b5e7770ee415d", kill_on_drop: false }` [INFO] [stdout] 162cc5e864ab177573d25cd4a9d9f73b40c93c1dbbc378696c2b5e7770ee415d [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4dc2c0b97d34cac6e17f3f474d9fca3e41d7745dac87c40cfbb675150c24a6d1 [INFO] running `Command { std: "docker" "start" "-a" "4dc2c0b97d34cac6e17f3f474d9fca3e41d7745dac87c40cfbb675150c24a6d1", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.96 [INFO] [stderr] Checking winnow v0.7.12 [INFO] [stderr] Checking percent-encoding v2.3.1 [INFO] [stderr] Checking toml_writer v1.0.2 [INFO] [stderr] Checking argparse v0.2.2 [INFO] [stderr] Checking colored v3.0.0 [INFO] [stderr] Checking clap_builder v4.5.43 [INFO] [stderr] Checking form_urlencoded v1.2.1 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Checking toml_parser v1.0.2 [INFO] [stderr] Checking clap v4.5.43 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling zerovec-derive v0.11.1 [INFO] [stderr] Compiling displaydoc v0.2.5 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling yoke-derive v0.8.0 [INFO] [stderr] Checking zerofrom v0.1.6 [INFO] [stderr] Checking yoke v0.8.0 [INFO] [stderr] Checking zerovec v0.11.4 [INFO] [stderr] Checking zerotrie v0.2.2 [INFO] [stderr] Checking tinystr v0.8.1 [INFO] [stderr] Checking potential_utf v0.1.2 [INFO] [stderr] Checking icu_collections v2.0.0 [INFO] [stderr] Checking icu_locale_core v2.0.0 [INFO] [stderr] Checking icu_provider v2.0.0 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking icu_properties v2.0.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking toml_datetime v0.7.0 [INFO] [stderr] Checking serde_spanned v1.0.0 [INFO] [stderr] Checking toml v0.9.5 [INFO] [stderr] Checking cmago v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/parser/parser.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::parser::package::{self, Package}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `self` [INFO] [stdout] --> src/parser/parser.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::parser::package::{self, Package}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::call_tools` [INFO] [stdout] --> src/cmago/gen.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::call_tools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::call_tools` [INFO] [stdout] --> src/cmago/gen.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use crate::call_tools; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/parser/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/parser/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod parser; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/parser/parser.rs:37:53 [INFO] [stdout] | [INFO] [stdout] 37 | let toml_content = fs::read_to_string(path).expect(&format!("Cannot read file: {}", path)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot read file: {}", path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/parser/parser.rs:40:67 [INFO] [stdout] | [INFO] [stdout] 40 | let config: CmagoToml = toml::de::from_str(&toml_content).expect(&format!("parse failed: {}", path)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("parse failed: {}", path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/parser/parser.rs:37:53 [INFO] [stdout] | [INFO] [stdout] 37 | let toml_content = fs::read_to_string(path).expect(&format!("Cannot read file: {}", path)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Cannot read file: {}", path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/parser/parser.rs:40:67 [INFO] [stdout] | [INFO] [stdout] 40 | let config: CmagoToml = toml::de::from_str(&toml_content).expect(&format!("parse failed: {}", path)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("parse failed: {}", path))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/parser/parser.rs:62:55 [INFO] [stdout] | [INFO] [stdout] 62 | self.libs.iter().find(|lib| lib.name == name).expect(&format!("lib <{name}> not found")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("lib <{name}> not found"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/parser/parser.rs:69:69 [INFO] [stdout] | [INFO] [stdout] 69 | fn register_lib(&self, lib:&Lib, cmake_config: &mut CmakeConfig)->() { [INFO] [stdout] | ^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/parser/parser.rs:62:55 [INFO] [stdout] | [INFO] [stdout] 62 | self.libs.iter().find(|lib| lib.name == name).expect(&format!("lib <{name}> not found")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("lib <{name}> not found"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/parser/parser.rs:85:69 [INFO] [stdout] | [INFO] [stdout] 85 | fn register_bin(&self, bin:&Bin, cmake_config: &mut CmakeConfig)->() { [INFO] [stdout] | ^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `parser::parser::CmagoToml` [INFO] [stdout] --> src/parser/parser.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | / pub fn to_string(&self) -> String { [INFO] [stdout] 94 | | toml::to_string(&self).unwrap() [INFO] [stdout] 95 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `parser::parser::CmagoToml` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/parser/parser.rs:69:69 [INFO] [stdout] | [INFO] [stdout] 69 | fn register_lib(&self, lib:&Lib, cmake_config: &mut CmakeConfig)->() { [INFO] [stdout] | ^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit return type [INFO] [stdout] --> src/parser/parser.rs:85:69 [INFO] [stdout] | [INFO] [stdout] 85 | fn register_bin(&self, bin:&Bin, cmake_config: &mut CmakeConfig)->() { [INFO] [stdout] | ^^^^ help: remove the `-> ()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `parser::parser::CmagoToml` [INFO] [stdout] --> src/parser/parser.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | / pub fn to_string(&self) -> String { [INFO] [stdout] 94 | | toml::to_string(&self).unwrap() [INFO] [stdout] 95 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `parser::parser::CmagoToml` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] = note: `#[warn(clippy::inherent_to_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/cmake_config/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod cmake_config; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/cmake_config/cmake_config.rs:64:14 [INFO] [stdout] | [INFO] [stdout] 64 | find.expect(&format!("lib {} not found", name)).clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("lib {} not found", name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cmake_config/cmake_config.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 70 | if self.tests.path!=""{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.tests.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/cmake_config/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod cmake_config; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/bin_config.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | &self.name.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/bin_config.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | &self.path.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.path.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/cmake_config/cmake_config.rs:64:14 [INFO] [stdout] | [INFO] [stdout] 64 | find.expect(&format!("lib {} not found", name)).clone() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("lib {} not found", name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/external_config.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | &self.path.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.path.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/external_config.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | &self.name.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cmake_config/cmake_config.rs:70:12 [INFO] [stdout] | [INFO] [stdout] 70 | if self.tests.path!=""{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.tests.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/lib_config.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | &self.lib_type.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.lib_type.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/lib_config.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | &self.path.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.path.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/lib_config.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | &self.name.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/cmake_config/as_lib.rs:4:17 [INFO] [stdout] | [INFO] [stdout] 4 | fn get_path<'a>(&'a self)->&'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 4 - fn get_path<'a>(&'a self)->&'a str; [INFO] [stdout] 4 + fn get_path(&self)->&str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/cmake_config/as_lib.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | fn get_name<'a>(&'a self)->&'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 5 - fn get_name<'a>(&'a self)->&'a str; [INFO] [stdout] 5 + fn get_name(&self)->&str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/cmake_config/as_bin.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | fn get_name<'a>(&'a self)->&'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 3 - fn get_name<'a>(&'a self)->&'a str; [INFO] [stdout] 3 + fn get_name(&self)->&str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/cmake_config/as_bin.rs:4:17 [INFO] [stdout] | [INFO] [stdout] 4 | fn get_path<'a>(&'a self)->&'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 4 - fn get_path<'a>(&'a self)->&'a str; [INFO] [stdout] 4 + fn get_path(&self)->&str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Dependencies` [INFO] [stdout] --> src/cmake_config/dependencies.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / pub fn new()->Self{ [INFO] [stdout] 10 | | Dependencies{dependencies:Vec::new()} [INFO] [stdout] 11 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 8 + impl Default for Dependencies { [INFO] [stdout] 9 + fn default() -> Self { [INFO] [stdout] 10 + Self::new() [INFO] [stdout] 11 + } [INFO] [stdout] 12 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/bin_config.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | &self.name.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TestsConfig` [INFO] [stdout] --> src/cmake_config/tests_config.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | / pub fn new()->Self{ [INFO] [stdout] 9 | | TestsConfig { path: "".to_string() } [INFO] [stdout] 10 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 7 + impl Default for TestsConfig { [INFO] [stdout] 8 + fn default() -> Self { [INFO] [stdout] 9 + Self::new() [INFO] [stdout] 10 + } [INFO] [stdout] 11 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/bin_config.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | &self.path.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.path.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/external_config.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 26 | &self.path.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.path.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/external_config.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | &self.name.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/call_tools.rs:6:35 [INFO] [stdout] | [INFO] [stdout] 6 | let mut command= Command::new(args[0].to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `args[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/lib_config.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | &self.lib_type.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.lib_type.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/lib_config.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | &self.path.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.path.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_config/lib_config.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | &self.name.as_str() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `self.name.as_str()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/cmake_config/as_lib.rs:4:17 [INFO] [stdout] | [INFO] [stdout] 4 | fn get_path<'a>(&'a self)->&'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 4 - fn get_path<'a>(&'a self)->&'a str; [INFO] [stdout] 4 + fn get_path(&self)->&str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/cmake_config/as_lib.rs:5:17 [INFO] [stdout] | [INFO] [stdout] 5 | fn get_name<'a>(&'a self)->&'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 5 - fn get_name<'a>(&'a self)->&'a str; [INFO] [stdout] 5 + fn get_name(&self)->&str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/cmake_config/as_bin.rs:3:17 [INFO] [stdout] | [INFO] [stdout] 3 | fn get_name<'a>(&'a self)->&'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 3 - fn get_name<'a>(&'a self)->&'a str; [INFO] [stdout] 3 + fn get_name(&self)->&str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/cmake_config/as_bin.rs:4:17 [INFO] [stdout] | [INFO] [stdout] 4 | fn get_path<'a>(&'a self)->&'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 4 - fn get_path<'a>(&'a self)->&'a str; [INFO] [stdout] 4 + fn get_path(&self)->&str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/call_tools.rs:10:72 [INFO] [stdout] | [INFO] [stdout] 10 | ...dio::inherit()).output().expect(format!("Failed to execute command: {command:?}").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to execute command: {command:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Dependencies` [INFO] [stdout] --> src/cmake_config/dependencies.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / pub fn new()->Self{ [INFO] [stdout] 10 | | Dependencies{dependencies:Vec::new()} [INFO] [stdout] 11 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 8 + impl Default for Dependencies { [INFO] [stdout] 9 + fn default() -> Self { [INFO] [stdout] 10 + Self::new() [INFO] [stdout] 11 + } [INFO] [stdout] 12 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `TestsConfig` [INFO] [stdout] --> src/cmake_config/tests_config.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | / pub fn new()->Self{ [INFO] [stdout] 9 | | TestsConfig { path: "".to_string() } [INFO] [stdout] 10 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 7 + impl Default for TestsConfig { [INFO] [stdout] 8 + fn default() -> Self { [INFO] [stdout] 9 + Self::new() [INFO] [stdout] 10 + } [INFO] [stdout] 11 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/call_tools.rs:6:35 [INFO] [stdout] | [INFO] [stdout] 6 | let mut command= Command::new(args[0].to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: use: `args[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/call_tools.rs:10:72 [INFO] [stdout] | [INFO] [stdout] 10 | ...dio::inherit()).output().expect(format!("Failed to execute command: {command:?}").as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Failed to execute command: {command:?}"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cmago/init.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | if !entries.next().is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `entries.next().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cmago/init.rs:10:36 [INFO] [stdout] | [INFO] [stdout] 10 | let mut entries = fs::read_dir(¤t_dir).unwrap(); // 读取目录 [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `current_dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/cmago/init.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | if !entries.next().is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `entries.next().is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/cmago/init.rs:10:36 [INFO] [stdout] | [INFO] [stdout] 10 | let mut entries = fs::read_dir(¤t_dir).unwrap(); // 读取目录 [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `current_dir` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cmago/gen.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if cmake_config.tests.path!=""{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cmake_config.tests.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cmago/gen.rs:13:8 [INFO] [stdout] | [INFO] [stdout] 13 | if cmake_config.tests.path!=""{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cmake_config.tests.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/cmago/utils.rs:71:43 [INFO] [stdout] | [INFO] [stdout] 71 | let mut file = File::create(path).expect(format!("Could not create {}", path.to_str().unwrap()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not create {}", path.to_str().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/cmago/utils.rs:72:48 [INFO] [stdout] | [INFO] [stdout] 72 | file.write_all(hello_world.as_bytes()).expect(format!("Could not write to {}", path.to_str().unwrap()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not write to {}", path.to_str().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cmago/build.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | if name=="" { [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/cmago/run.rs:11:41 [INFO] [stdout] | [INFO] [stdout] 11 | } else if cfg!(target_os = "linux") { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 12 | | exec_path = exec_path.join(name); [INFO] [stdout] 13 | | } else if cfg!(target_os = "macos") { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/cmago/run.rs:13:41 [INFO] [stdout] | [INFO] [stdout] 13 | } else if cfg!(target_os = "macos") { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 14 | | exec_path = exec_path.join(name); [INFO] [stdout] 15 | | } else{ [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/cmago/utils.rs:71:43 [INFO] [stdout] | [INFO] [stdout] 71 | let mut file = File::create(path).expect(format!("Could not create {}", path.to_str().unwrap()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not create {}", path.to_str().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/cmago/utils.rs:72:48 [INFO] [stdout] | [INFO] [stdout] 72 | file.write_all(hello_world.as_bytes()).expect(format!("Could not write to {}", path.to_str().unwrap()).as_str()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| panic!("Could not write to {}", path.to_str().unwrap()))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CMakeLists` [INFO] [stdout] --> src/cmake_generator/command.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn new() -> CMakeLists{ [INFO] [stdout] 13 | | CMakeLists{context: String::new()} [INFO] [stdout] 14 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 11 + impl Default for CMakeLists { [INFO] [stdout] 12 + fn default() -> Self { [INFO] [stdout] 13 + Self::new() [INFO] [stdout] 14 + } [INFO] [stdout] 15 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cmago/build.rs:8:8 [INFO] [stdout] | [INFO] [stdout] 8 | if name=="" { [INFO] [stdout] | ^^^^^^^^ help: using `is_empty` is clearer and more explicit: `name.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/cmago/run.rs:11:41 [INFO] [stdout] | [INFO] [stdout] 11 | } else if cfg!(target_os = "linux") { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 12 | | exec_path = exec_path.join(name); [INFO] [stdout] 13 | | } else if cfg!(target_os = "macos") { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/cmago/run.rs:13:41 [INFO] [stdout] | [INFO] [stdout] 13 | } else if cfg!(target_os = "macos") { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 14 | | exec_path = exec_path.join(name); [INFO] [stdout] 15 | | } else{ [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CMakeLists` [INFO] [stdout] --> src/cmake_generator/command.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn new() -> CMakeLists{ [INFO] [stdout] 13 | | CMakeLists{context: String::new()} [INFO] [stdout] 14 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 11 + impl Default for CMakeLists { [INFO] [stdout] 12 + fn default() -> Self { [INFO] [stdout] 13 + Self::new() [INFO] [stdout] 14 + } [INFO] [stdout] 15 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cmake_generator/group.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | if bin.get_str_deps().len() > 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bin.get_str_deps().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/cmake_generator/group.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | if bin.get_str_deps().len() > 0{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bin.get_str_deps().is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_generator/mod.rs:33:58 [INFO] [stdout] | [INFO] [stdout] 33 | group::exec_cmake(&mut cmake_lists, cmake_config,&bin); [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cmake_generator/mod.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | if cmake_config.tests.path!=""{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cmake_config.tests.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/cmake_generator/mod.rs:33:58 [INFO] [stdout] | [INFO] [stdout] 33 | group::exec_cmake(&mut cmake_lists, cmake_config,&bin); [INFO] [stdout] | ^^^^ help: change this to: `bin` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/famous_libraries/mod.rs:4:21 [INFO] [stdout] | [INFO] [stdout] 4 | return Some(&item.1); [INFO] [stdout] | ^^^^^^^ help: change this to: `item.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/cmake_generator/mod.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 35 | if cmake_config.tests.path!=""{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!cmake_config.tests.path.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/famous_libraries/mod.rs:4:21 [INFO] [stdout] | [INFO] [stdout] 4 | return Some(&item.1); [INFO] [stdout] | ^^^^^^^ help: change this to: `item.1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 17.68s [INFO] running `Command { std: "docker" "inspect" "4dc2c0b97d34cac6e17f3f474d9fca3e41d7745dac87c40cfbb675150c24a6d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4dc2c0b97d34cac6e17f3f474d9fca3e41d7745dac87c40cfbb675150c24a6d1", kill_on_drop: false }` [INFO] [stdout] 4dc2c0b97d34cac6e17f3f474d9fca3e41d7745dac87c40cfbb675150c24a6d1