[INFO] fetching crate lex-map_editor_std 0.2.0... [INFO] linting lex-map_editor_std-0.2.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate lex-map_editor_std 0.2.0 into /workspace/builds/worker-4-tc1/source [INFO] started tweaking crates.io crate lex-map_editor_std 0.2.0 [INFO] finished tweaking crates.io crate lex-map_editor_std 0.2.0 [INFO] tweaked toml for crates.io crate lex-map_editor_std 0.2.0 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate lex-map_editor_std 0.2.0 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] aace6c4a3a09db14a604e8bc8b6cdaab918a6465c8239b07d1e36094f098afde [INFO] running `Command { std: "docker" "start" "-a" "aace6c4a3a09db14a604e8bc8b6cdaab918a6465c8239b07d1e36094f098afde", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aace6c4a3a09db14a604e8bc8b6cdaab918a6465c8239b07d1e36094f098afde", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aace6c4a3a09db14a604e8bc8b6cdaab918a6465c8239b07d1e36094f098afde", kill_on_drop: false }` [INFO] [stdout] aace6c4a3a09db14a604e8bc8b6cdaab918a6465c8239b07d1e36094f098afde [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] bfe663e626dcad9204764ca6b71264e57aeab01759458d3fb9b9997f72fc54f3 [INFO] running `Command { std: "docker" "start" "-a" "bfe663e626dcad9204764ca6b71264e57aeab01759458d3fb9b9997f72fc54f3", kill_on_drop: false }` [INFO] [stderr] Checking lex-map_editor_std v0.2.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types/block.rs:22:2 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] 23 | | let data:Vec<&str> = data.split(',').collect(); [INFO] [stdout] 24 | | if !(data.len() > 4) {return Err("insuficient data")}; [INFO] [stdout] 25 | | if data[0] != "block" { [INFO] [stdout] ... | [INFO] [stdout] 42 | | }) [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types/block.rs:24:6 [INFO] [stdout] | [INFO] [stdout] 24 | if !(data.len() > 4) {return Err("insuficient data")}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(data.len() <= 4)` [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: implementation of inherent method `to_string(&self) -> String` for type `types::block::Block` [INFO] [stdout] --> src/types/block.rs:45:2 [INFO] [stdout] | [INFO] [stdout] 45 | / pub fn to_string(&self) -> String { [INFO] [stdout] 46 | | ["block,", [INFO] [stdout] 47 | | &self.string_id, ",", [INFO] [stdout] 48 | | &self.u_id.to_string(), ",", [INFO] [stdout] ... | [INFO] [stdout] 51 | | ].concat() [INFO] [stdout] 52 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::block::Block` 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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types/object.rs:27:2 [INFO] [stdout] | [INFO] [stdout] 27 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] 28 | | let data:Vec<&str> = data.split(',').collect(); [INFO] [stdout] 29 | | if !(data.len() > 6) {return Err("insuficient data")}; [INFO] [stdout] 30 | | if data[0] != "object" { [INFO] [stdout] ... | [INFO] [stdout] 55 | | }) [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types/object.rs:29:6 [INFO] [stdout] | [INFO] [stdout] 29 | if !(data.len() > 6) {return Err("insuficient data")}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(data.len() <= 6)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `types::object::Object` [INFO] [stdout] --> src/types/object.rs:58:2 [INFO] [stdout] | [INFO] [stdout] 58 | / pub fn to_string(&self) -> String { [INFO] [stdout] 59 | | ["object,", [INFO] [stdout] 60 | | &self.string_id, ",", [INFO] [stdout] 61 | | &self.u_id.to_string(), ",", [INFO] [stdout] ... | [INFO] [stdout] 66 | | ].concat() [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::object::Object` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types/entity.rs:24:2 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] 25 | | let data:Vec<&str> = data.split(',').collect(); [INFO] [stdout] 26 | | if !(data.len() > 5) {return Err("insuficient data")}; [INFO] [stdout] 27 | | if data[0] != "entity" { [INFO] [stdout] ... | [INFO] [stdout] 45 | | }) [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types/entity.rs:26:6 [INFO] [stdout] | [INFO] [stdout] 26 | if !(data.len() > 5) {return Err("insuficient data")}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(data.len() <= 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `types::entity::Entity` [INFO] [stdout] --> src/types/entity.rs:48:2 [INFO] [stdout] | [INFO] [stdout] 48 | / pub fn to_string(&self) -> String { [INFO] [stdout] 49 | | ["entity,", [INFO] [stdout] 50 | | &self.string_id, ",", [INFO] [stdout] 51 | | &self.u_id.to_string(), ",", [INFO] [stdout] ... | [INFO] [stdout] 55 | | ].concat() [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::entity::Entity` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `map::Map` [INFO] [stdout] --> src/map.rs:45:2 [INFO] [stdout] | [INFO] [stdout] 45 | / pub fn to_string(&self) -> String { [INFO] [stdout] 46 | | ["map,version,",&self.version,"\n", [INFO] [stdout] 47 | | "map,name,",&self.name,"\n", [INFO] [stdout] 48 | | "map,unit,",&self.unit.to_string(),"\n", [INFO] [stdout] 49 | | "map,size,",&self.size_x.to_string(),",",&self.size_y.to_string(),"\n", [INFO] [stdout] 50 | | ].concat() [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `map::Map` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map.rs:75:10 [INFO] [stdout] | [INFO] [stdout] 75 | if !(data.len() > 3) {return Err("insuficient size data")}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(data.len() <= 3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/map.rs:87:54 [INFO] [stdout] | [INFO] [stdout] 87 | "block" => tmp.blocks.push(match Block::from_str(&data_line) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `data_line` [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/map.rs:91:57 [INFO] [stdout] | [INFO] [stdout] 91 | "object" => tmp.objects.push(match Object::from_str(&data_line) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `data_line` [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/map.rs:95:58 [INFO] [stdout] | [INFO] [stdout] 95 | "entity" => tmp.entities.push(match Entity::from_str(&data_line) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `data_line` [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: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/map.rs:107:10 [INFO] [stdout] | [INFO] [stdout] 107 | if let Err(..) = writeln!(file, "{}", self.to_string()) { [INFO] [stdout] | -------^^^^^^^----------------------------------------- help: try: `if writeln!(file, "{}", self.to_string()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/map.rs:112:11 [INFO] [stdout] | [INFO] [stdout] 112 | if let Err(..) = writeln!(file, "{}", block.to_string()) { [INFO] [stdout] | -------^^^^^^^------------------------------------------ help: try: `if writeln!(file, "{}", block.to_string()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/map.rs:117:11 [INFO] [stdout] | [INFO] [stdout] 117 | if let Err(..) = writeln!(file, "{}", object.to_string()) { [INFO] [stdout] | -------^^^^^^^------------------------------------------- help: try: `if writeln!(file, "{}", object.to_string()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/map.rs:122:11 [INFO] [stdout] | [INFO] [stdout] 122 | if let Err(..) = writeln!(file, "{}", entity.to_string()) { [INFO] [stdout] | -------^^^^^^^------------------------------------------- help: try: `if writeln!(file, "{}", entity.to_string()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types/block.rs:22:2 [INFO] [stdout] | [INFO] [stdout] 22 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] 23 | | let data:Vec<&str> = data.split(',').collect(); [INFO] [stdout] 24 | | if !(data.len() > 4) {return Err("insuficient data")}; [INFO] [stdout] 25 | | if data[0] != "block" { [INFO] [stdout] ... | [INFO] [stdout] 42 | | }) [INFO] [stdout] 43 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types/block.rs:24:6 [INFO] [stdout] | [INFO] [stdout] 24 | if !(data.len() > 4) {return Err("insuficient data")}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(data.len() <= 4)` [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: implementation of inherent method `to_string(&self) -> String` for type `types::block::Block` [INFO] [stdout] --> src/types/block.rs:45:2 [INFO] [stdout] | [INFO] [stdout] 45 | / pub fn to_string(&self) -> String { [INFO] [stdout] 46 | | ["block,", [INFO] [stdout] 47 | | &self.string_id, ",", [INFO] [stdout] 48 | | &self.u_id.to_string(), ",", [INFO] [stdout] ... | [INFO] [stdout] 51 | | ].concat() [INFO] [stdout] 52 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::block::Block` 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: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types/object.rs:27:2 [INFO] [stdout] | [INFO] [stdout] 27 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] 28 | | let data:Vec<&str> = data.split(',').collect(); [INFO] [stdout] 29 | | if !(data.len() > 6) {return Err("insuficient data")}; [INFO] [stdout] 30 | | if data[0] != "object" { [INFO] [stdout] ... | [INFO] [stdout] 55 | | }) [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types/object.rs:29:6 [INFO] [stdout] | [INFO] [stdout] 29 | if !(data.len() > 6) {return Err("insuficient data")}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(data.len() <= 6)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `types::object::Object` [INFO] [stdout] --> src/types/object.rs:58:2 [INFO] [stdout] | [INFO] [stdout] 58 | / pub fn to_string(&self) -> String { [INFO] [stdout] 59 | | ["object,", [INFO] [stdout] 60 | | &self.string_id, ",", [INFO] [stdout] 61 | | &self.u_id.to_string(), ",", [INFO] [stdout] ... | [INFO] [stdout] 66 | | ].concat() [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::object::Object` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types/entity.rs:24:2 [INFO] [stdout] | [INFO] [stdout] 24 | / pub fn from_str(data: &str) -> Result { [INFO] [stdout] 25 | | let data:Vec<&str> = data.split(',').collect(); [INFO] [stdout] 26 | | if !(data.len() > 5) {return Err("insuficient data")}; [INFO] [stdout] 27 | | if data[0] != "entity" { [INFO] [stdout] ... | [INFO] [stdout] 45 | | }) [INFO] [stdout] 46 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/types/entity.rs:26:6 [INFO] [stdout] | [INFO] [stdout] 26 | if !(data.len() > 5) {return Err("insuficient data")}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(data.len() <= 5)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `types::entity::Entity` [INFO] [stdout] --> src/types/entity.rs:48:2 [INFO] [stdout] | [INFO] [stdout] 48 | / pub fn to_string(&self) -> String { [INFO] [stdout] 49 | | ["entity,", [INFO] [stdout] 50 | | &self.string_id, ",", [INFO] [stdout] 51 | | &self.u_id.to_string(), ",", [INFO] [stdout] ... | [INFO] [stdout] 55 | | ].concat() [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `types::entity::Entity` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `map::Map` [INFO] [stdout] --> src/map.rs:45:2 [INFO] [stdout] | [INFO] [stdout] 45 | / pub fn to_string(&self) -> String { [INFO] [stdout] 46 | | ["map,version,",&self.version,"\n", [INFO] [stdout] 47 | | "map,name,",&self.name,"\n", [INFO] [stdout] 48 | | "map,unit,",&self.unit.to_string(),"\n", [INFO] [stdout] 49 | | "map,size,",&self.size_x.to_string(),",",&self.size_y.to_string(),"\n", [INFO] [stdout] 50 | | ].concat() [INFO] [stdout] 51 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `map::Map` instead [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/map.rs:75:10 [INFO] [stdout] | [INFO] [stdout] 75 | if !(data.len() > 3) {return Err("insuficient size data")}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `(data.len() <= 3)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/map.rs:87:54 [INFO] [stdout] | [INFO] [stdout] 87 | "block" => tmp.blocks.push(match Block::from_str(&data_line) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `data_line` [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/map.rs:91:57 [INFO] [stdout] | [INFO] [stdout] 91 | "object" => tmp.objects.push(match Object::from_str(&data_line) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `data_line` [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/map.rs:95:58 [INFO] [stdout] | [INFO] [stdout] 95 | "entity" => tmp.entities.push(match Entity::from_str(&data_line) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `data_line` [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: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/map.rs:107:10 [INFO] [stdout] | [INFO] [stdout] 107 | if let Err(..) = writeln!(file, "{}", self.to_string()) { [INFO] [stdout] | -------^^^^^^^----------------------------------------- help: try: `if writeln!(file, "{}", self.to_string()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/map.rs:112:11 [INFO] [stdout] | [INFO] [stdout] 112 | if let Err(..) = writeln!(file, "{}", block.to_string()) { [INFO] [stdout] | -------^^^^^^^------------------------------------------ help: try: `if writeln!(file, "{}", block.to_string()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/map.rs:117:11 [INFO] [stdout] | [INFO] [stdout] 117 | if let Err(..) = writeln!(file, "{}", object.to_string()) { [INFO] [stdout] | -------^^^^^^^------------------------------------------- help: try: `if writeln!(file, "{}", object.to_string()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_err()` [INFO] [stdout] --> src/map.rs:122:11 [INFO] [stdout] | [INFO] [stdout] 122 | if let Err(..) = writeln!(file, "{}", entity.to_string()) { [INFO] [stdout] | -------^^^^^^^------------------------------------------- help: try: `if writeln!(file, "{}", entity.to_string()).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.27s [INFO] running `Command { std: "docker" "inspect" "bfe663e626dcad9204764ca6b71264e57aeab01759458d3fb9b9997f72fc54f3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bfe663e626dcad9204764ca6b71264e57aeab01759458d3fb9b9997f72fc54f3", kill_on_drop: false }` [INFO] [stdout] bfe663e626dcad9204764ca6b71264e57aeab01759458d3fb9b9997f72fc54f3