[INFO] cloning repository https://github.com/BlueSpaceCanary/rustbucket [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/BlueSpaceCanary/rustbucket" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBlueSpaceCanary%2Frustbucket", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBlueSpaceCanary%2Frustbucket'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] bc3666b190c7843b6d13defa36750ca89eef73a9 [INFO] linting BlueSpaceCanary/rustbucket against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBlueSpaceCanary%2Frustbucket" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/BlueSpaceCanary/rustbucket [INFO] finished tweaking git repo https://github.com/BlueSpaceCanary/rustbucket [INFO] tweaked toml for git repo https://github.com/BlueSpaceCanary/rustbucket written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/BlueSpaceCanary/rustbucket 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/BlueSpaceCanary/rustbucket 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] Downloading crates ... [INFO] [stderr] Downloaded anyhow v1.0.57 [INFO] [stderr] Downloaded crossbeam-utils v0.8.9 [INFO] [stderr] Downloaded governor v0.4.2 [INFO] [stderr] Downloaded raw-cpuid v10.3.0 [INFO] [stderr] Downloaded diesel v1.4.8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] 6484b23a372dbb617c9f3cb6cf150fadd7309e72b1b9f2ef27bfaabf56fbf405 [INFO] running `Command { std: "docker" "start" "-a" "6484b23a372dbb617c9f3cb6cf150fadd7309e72b1b9f2ef27bfaabf56fbf405", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6484b23a372dbb617c9f3cb6cf150fadd7309e72b1b9f2ef27bfaabf56fbf405", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6484b23a372dbb617c9f3cb6cf150fadd7309e72b1b9f2ef27bfaabf56fbf405", kill_on_drop: false }` [INFO] [stdout] 6484b23a372dbb617c9f3cb6cf150fadd7309e72b1b9f2ef27bfaabf56fbf405 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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] cee6f2f70688bfa914a39780c3812c29e6d1a0c09f5f86db874b9d0f63d4bbd6 [INFO] running `Command { std: "docker" "start" "-a" "cee6f2f70688bfa914a39780c3812c29e6d1a0c09f5f86db874b9d0f63d4bbd6", kill_on_drop: false }` [INFO] [stderr] Compiling unicode-ident v1.0.1 [INFO] [stderr] Compiling syn v1.0.96 [INFO] [stderr] Compiling futures-channel v0.3.21 [INFO] [stderr] Compiling lock_api v0.4.7 [INFO] [stderr] Compiling futures-util v0.3.21 [INFO] [stderr] Checking getrandom v0.2.7 [INFO] [stderr] Checking mio v0.8.3 [INFO] [stderr] Compiling parking_lot_core v0.9.3 [INFO] [stderr] Compiling crossbeam-utils v0.8.9 [INFO] [stderr] Checking num-traits v0.2.15 [INFO] [stderr] Compiling parking_lot_core v0.8.5 [INFO] [stderr] Checking aho-corasick v0.7.18 [INFO] [stderr] Checking raw-cpuid v10.3.0 [INFO] [stderr] Checking time v0.1.43 [INFO] [stderr] Checking hashbrown v0.12.1 [INFO] [stderr] Compiling anyhow v1.0.57 [INFO] [stderr] Compiling proc-macro2 v1.0.39 [INFO] [stderr] Checking regex-syntax v0.6.26 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking nonzero_ext v0.3.0 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking futures-timer v3.0.2 [INFO] [stderr] Checking termcolor v1.1.3 [INFO] [stderr] Checking rand_xorshift v0.3.0 [INFO] [stderr] Compiling quote v1.0.18 [INFO] [stderr] Checking parking_lot v0.11.2 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking dashmap v5.3.4 [INFO] [stderr] Checking num-integer v0.1.45 [INFO] [stderr] Checking regex v1.5.6 [INFO] [stderr] Checking quanta v0.9.3 [INFO] [stderr] Checking chrono v0.4.19 [INFO] [stderr] Checking env_logger v0.9.0 [INFO] [stderr] Compiling tokio-macros v1.8.0 [INFO] [stderr] Compiling futures-macro v0.3.21 [INFO] [stderr] Compiling openssl-macros v0.1.0 [INFO] [stderr] Compiling serde_derive v1.0.137 [INFO] [stderr] Compiling thiserror-impl v1.0.31 [INFO] [stderr] Compiling pin-project-internal v1.0.10 [INFO] [stderr] Compiling diesel_derives v1.4.1 [INFO] [stderr] Checking openssl v0.10.40 [INFO] [stderr] Checking tokio v1.19.2 [INFO] [stderr] Checking pin-project v1.0.10 [INFO] [stderr] Checking thiserror v1.0.31 [INFO] [stderr] Checking diesel v1.4.8 [INFO] [stderr] Checking tokio-util v0.6.10 [INFO] [stderr] Checking tokio-stream v0.1.9 [INFO] [stderr] Checking serde v1.0.137 [INFO] [stderr] Checking native-tls v0.2.10 [INFO] [stderr] Checking futures-executor v0.3.21 [INFO] [stderr] Checking tokio-native-tls v0.3.0 [INFO] [stderr] Checking futures v0.3.21 [INFO] [stderr] Checking irc-proto v0.15.0 [INFO] [stderr] Checking governor v0.4.2 [INFO] [stderr] Checking toml v0.5.9 [INFO] [stderr] Checking irc v0.15.0 [INFO] [stderr] Checking rustbucket v0.0.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/brain.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/brain.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::hippocampus::Hippocampus` [INFO] [stdout] --> src/brain/responder.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use super::hippocampus::Hippocampus; [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 variable: `path` [INFO] [stdout] --> src/brain/hippocampus.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | fn new(path: &'static str) -> Self { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key` [INFO] [stdout] --> src/brain/hippocampus.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | fn recall(&self, key: &str) -> Option { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `factoid` [INFO] [stdout] --> src/brain/hippocampus.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | fn learn(&self, factoid: &NewFactoid) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_factoid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `set_rng_seed` is never used [INFO] [stdout] --> src/brain.rs:58:12 [INFO] [stdout] | [INFO] [stdout] 49 | impl Brain { [INFO] [stdout] | ---------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 58 | pub fn set_rng_seed(&mut self, seed: u64) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `recall` is never used [INFO] [stdout] --> src/brain/hippocampus.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Hippocampus { [INFO] [stdout] | ----------- method in this trait [INFO] [stdout] 5 | fn new(path: &'static str) -> Self; [INFO] [stdout] 6 | fn recall(&self, key: &str) -> Option; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `id` and `pred` are never read [INFO] [stdout] --> src/models.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Factoid { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 5 | pub id: i32, [INFO] [stdout] | ^^ [INFO] [stdout] 6 | pub key: String, [INFO] [stdout] 7 | pub pred: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/brain/responder.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | resps.sort_unstable_by(|x, y| x.priority.cmp(&y.priority)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 29 - resps.sort_unstable_by(|x, y| x.priority.cmp(&y.priority)); [INFO] [stdout] 29 + resps.sort_unstable_by_key(|x| x.priority); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/brain/responder.rs:32:19 [INFO] [stdout] | [INFO] [stdout] 32 | let min = resps [INFO] [stdout] | ___________________^ [INFO] [stdout] 33 | | .get(0) [INFO] [stdout] 34 | | .and_then(|x| Some(x.priority)) [INFO] [stdout] 35 | | .or_else(|| Some(69)) [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `or` instead [INFO] [stdout] | [INFO] [stdout] 35 - .or_else(|| Some(69)) [INFO] [stdout] 35 + .or(Some(69)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/brain/responder.rs:32:19 [INFO] [stdout] | [INFO] [stdout] 32 | let min = resps [INFO] [stdout] | ___________________^ [INFO] [stdout] 33 | | .get(0) [INFO] [stdout] 34 | | .and_then(|x| Some(x.priority)) [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 32 ~ let min = resps [INFO] [stdout] 33 + .get(0).map(|x| x.priority) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `resps.get(0)` [INFO] [stdout] --> src/brain/responder.rs:32:19 [INFO] [stdout] | [INFO] [stdout] 32 | let min = resps [INFO] [stdout] | ___________________^ [INFO] [stdout] 33 | | .get(0) [INFO] [stdout] | |___________________^ help: try: `resps.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::hippocampus::Hippocampus` [INFO] [stdout] --> src/brain/responder.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use super::hippocampus::Hippocampus; [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 variable: `path` [INFO] [stdout] --> src/brain/hippocampus.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | fn new(path: &'static str) -> Self { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `key` [INFO] [stdout] --> src/brain/hippocampus.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 17 | fn recall(&self, key: &str) -> Option { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_key` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `factoid` [INFO] [stdout] --> src/brain/hippocampus.rs:21:21 [INFO] [stdout] | [INFO] [stdout] 21 | fn learn(&self, factoid: &NewFactoid) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_factoid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/brain/responder.rs:149:50 [INFO] [stdout] | [INFO] [stdout] 149 | Some(Response::new(input.to_owned(), std::u32::MAX)) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 149 - Some(Response::new(input.to_owned(), std::u32::MAX)) [INFO] [stdout] 149 + Some(Response::new(input.to_owned(), u32::MAX)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/brain/responder.rs:160:53 [INFO] [stdout] | [INFO] [stdout] 160 | Some(Response::new("MEOW!".to_string(), std::u32::MAX)) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 160 - Some(Response::new("MEOW!".to_string(), std::u32::MAX)) [INFO] [stdout] 160 + Some(Response::new("MEOW!".to_string(), u32::MAX)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/brain/util.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | if base.len() == 0 && candidate.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `base.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/brain/util.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | if base.len() == 0 && candidate.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `candidate.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/brain/util.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | } else if base.len() == 0 && candidate.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `base.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/brain/util.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | } else if base.len() == 0 && candidate.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!candidate.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/brain.rs:30:25 [INFO] [stdout] | [INFO] [stdout] 30 | mem: T::new(&"asdf"), [INFO] [stdout] | ^^^^^^^ help: change this to: `"asdf"` [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: stripping a prefix manually [INFO] [stdout] --> src/brain.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | return Some(&tail[2..]); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/brain.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | if tail.starts_with(": ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 78 ~ if let Some() = tail.strip_prefix(": ") { [INFO] [stdout] 79 ~ return Some(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/models.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Queryable)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Queryable` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_queryable_for_factoid` [INFO] [stdout] 4 | pub struct Factoid { [INFO] [stdout] | ------- `Factoid` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Queryable` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Queryable` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Queryable` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/models.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[derive(Insertable)] [INFO] [stdout] | ^--------- [INFO] [stdout] | | [INFO] [stdout] | `Insertable` is not local [INFO] [stdout] | `table` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_insertable_for_newfactoid` [INFO] [stdout] 12 | #[table_name = "brain"] [INFO] [stdout] 13 | pub struct NewFactoid { [INFO] [stdout] | ---------- `NewFactoid` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Insertable` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Insertable` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `Insertable` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/models.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[derive(Insertable)] [INFO] [stdout] | -^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `Insertable` is not local [INFO] [stdout] | `table` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_insertable_for_newfactoid` [INFO] [stdout] 12 | #[table_name = "brain"] [INFO] [stdout] 13 | pub struct NewFactoid { [INFO] [stdout] | ---------- `NewFactoid` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Insertable` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Insertable` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `Insertable` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/models.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[derive(Insertable)] [INFO] [stdout] | ^--------- [INFO] [stdout] | | [INFO] [stdout] | `UndecoratedInsertRecord` is not local [INFO] [stdout] | `table` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_insertable_for_newfactoid` [INFO] [stdout] 12 | #[table_name = "brain"] [INFO] [stdout] 13 | pub struct NewFactoid { [INFO] [stdout] | ---------- `NewFactoid` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Insertable` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Insertable` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `Insertable` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] ... | [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | | `table` is not local [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_table` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] | | -- `id` is not local [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] ... | [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_id` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] | | -------- `fact_key` is not local [INFO] [stdout] ... | [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_fact_key` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] 5 | | fact_pred -> Text, [INFO] [stdout] | | --------- `fact_pred` is not local [INFO] [stdout] ... | [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_fact_pred` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] 5 | | fact_pred -> Text, [INFO] [stdout] 6 | | fact_val -> Text, [INFO] [stdout] | | -------- `fact_val` is not local [INFO] [stdout] 7 | | } [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_fact_val` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `recall` is never used [INFO] [stdout] --> src/brain/hippocampus.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 4 | pub trait Hippocampus { [INFO] [stdout] | ----------- method in this trait [INFO] [stdout] 5 | fn new(path: &'static str) -> Self; [INFO] [stdout] 6 | fn recall(&self, key: &str) -> Option; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `id` and `pred` are never read [INFO] [stdout] --> src/models.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Factoid { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 5 | pub id: i32, [INFO] [stdout] | ^^ [INFO] [stdout] 6 | pub key: String, [INFO] [stdout] 7 | pub pred: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/brain/responder.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | resps.sort_unstable_by(|x, y| x.priority.cmp(&y.priority)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 29 - resps.sort_unstable_by(|x, y| x.priority.cmp(&y.priority)); [INFO] [stdout] 29 + resps.sort_unstable_by_key(|x| x.priority); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/brain/responder.rs:32:19 [INFO] [stdout] | [INFO] [stdout] 32 | let min = resps [INFO] [stdout] | ___________________^ [INFO] [stdout] 33 | | .get(0) [INFO] [stdout] 34 | | .and_then(|x| Some(x.priority)) [INFO] [stdout] 35 | | .or_else(|| Some(69)) [INFO] [stdout] | |_________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `or` instead [INFO] [stdout] | [INFO] [stdout] 35 - .or_else(|| Some(69)) [INFO] [stdout] 35 + .or(Some(69)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` [INFO] [stdout] --> src/brain/responder.rs:32:19 [INFO] [stdout] | [INFO] [stdout] 32 | let min = resps [INFO] [stdout] | ___________________^ [INFO] [stdout] 33 | | .get(0) [INFO] [stdout] 34 | | .and_then(|x| Some(x.priority)) [INFO] [stdout] | |___________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 32 ~ let min = resps [INFO] [stdout] 33 + .get(0).map(|x| x.priority) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `resps.get(0)` [INFO] [stdout] --> src/brain/responder.rs:32:19 [INFO] [stdout] | [INFO] [stdout] 32 | let min = resps [INFO] [stdout] | ___________________^ [INFO] [stdout] 33 | | .get(0) [INFO] [stdout] | |___________________^ help: try: `resps.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` 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/brain/responder.rs:63:29 [INFO] [stdout] | [INFO] [stdout] 63 | assert_eq!(resp.respond(&"awoo").collect::>(), vec!("awoo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/responder.rs:64:29 [INFO] [stdout] | [INFO] [stdout] 64 | assert_eq!(resp.respond(&"Miao").collect::>(), vec!("Miao")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"Miao"` [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/brain/responder.rs:66:22 [INFO] [stdout] | [INFO] [stdout] 66 | resp.respond(&"look, a goblin!").collect::>(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `"look, a goblin!"` [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/brain/responder.rs:83:22 [INFO] [stdout] | [INFO] [stdout] 83 | resp.respond(&"awoo").collect::>(), [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/responder.rs:139:24 [INFO] [stdout] | [INFO] [stdout] 139 | resper.respond(&"spinch the robot") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `"spinch the robot"` [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: usage of a legacy numeric constant [INFO] [stdout] --> src/brain/responder.rs:149:50 [INFO] [stdout] | [INFO] [stdout] 149 | Some(Response::new(input.to_owned(), std::u32::MAX)) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 149 - Some(Response::new(input.to_owned(), std::u32::MAX)) [INFO] [stdout] 149 + Some(Response::new(input.to_owned(), u32::MAX)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of a legacy numeric constant [INFO] [stdout] --> src/brain/responder.rs:160:53 [INFO] [stdout] | [INFO] [stdout] 160 | Some(Response::new("MEOW!".to_string(), std::u32::MAX)) [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] help: use the associated constant instead [INFO] [stdout] | [INFO] [stdout] 160 - Some(Response::new("MEOW!".to_string(), std::u32::MAX)) [INFO] [stdout] 160 + Some(Response::new("MEOW!".to_string(), u32::MAX)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/brain/util.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | if base.len() == 0 && candidate.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `base.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/brain/util.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | if base.len() == 0 && candidate.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `candidate.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/brain/util.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | } else if base.len() == 0 && candidate.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `base.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] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/brain/util.rs:7:34 [INFO] [stdout] | [INFO] [stdout] 7 | } else if base.len() == 0 && candidate.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!candidate.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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/brain/util.rs:58:26 [INFO] [stdout] | [INFO] [stdout] 58 | assert!(is_extension(&"awoo", &"awoo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:58:35 [INFO] [stdout] | [INFO] [stdout] 58 | assert!(is_extension(&"awoo", &"awoo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:59:26 [INFO] [stdout] | [INFO] [stdout] 59 | assert!(is_extension(&"awoo", &"awooo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:59:35 [INFO] [stdout] | [INFO] [stdout] 59 | assert!(is_extension(&"awoo", &"awooo")); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"awooo"` [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/brain/util.rs:60:26 [INFO] [stdout] | [INFO] [stdout] 60 | assert!(is_extension(&"awoo", &"aawoo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:60:35 [INFO] [stdout] | [INFO] [stdout] 60 | assert!(is_extension(&"awoo", &"aawoo")); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"aawoo"` [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/brain/util.rs:61:26 [INFO] [stdout] | [INFO] [stdout] 61 | assert!(is_extension(&"awoo", &"awwoo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:61:35 [INFO] [stdout] | [INFO] [stdout] 61 | assert!(is_extension(&"awoo", &"awwoo")); [INFO] [stdout] | ^^^^^^^^ help: change this to: `"awwoo"` [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/brain/util.rs:62:27 [INFO] [stdout] | [INFO] [stdout] 62 | assert!(!is_extension(&"awoo", &"awo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:62:36 [INFO] [stdout] | [INFO] [stdout] 62 | assert!(!is_extension(&"awoo", &"awo")); [INFO] [stdout] | ^^^^^^ help: change this to: `"awo"` [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/brain/util.rs:63:27 [INFO] [stdout] | [INFO] [stdout] 63 | assert!(!is_extension(&"awwo", &"awo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awwo"` [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/brain/util.rs:63:36 [INFO] [stdout] | [INFO] [stdout] 63 | assert!(!is_extension(&"awwo", &"awo")); [INFO] [stdout] | ^^^^^^ help: change this to: `"awo"` [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/brain/util.rs:64:27 [INFO] [stdout] | [INFO] [stdout] 64 | assert!(!is_extension(&"awoo", &"ao")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:64:36 [INFO] [stdout] | [INFO] [stdout] 64 | assert!(!is_extension(&"awoo", &"ao")); [INFO] [stdout] | ^^^^^ help: change this to: `"ao"` [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/brain/util.rs:65:27 [INFO] [stdout] | [INFO] [stdout] 65 | assert!(!is_extension(&"awoo", &"aowo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:65:36 [INFO] [stdout] | [INFO] [stdout] 65 | assert!(!is_extension(&"awoo", &"aowo")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"aowo"` [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/brain/util.rs:66:27 [INFO] [stdout] | [INFO] [stdout] 66 | assert!(!is_extension(&"awoo", &"aw0o")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"awoo"` [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/brain/util.rs:66:36 [INFO] [stdout] | [INFO] [stdout] 66 | assert!(!is_extension(&"awoo", &"aw0o")); [INFO] [stdout] | ^^^^^^^ help: change this to: `"aw0o"` [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/brain.rs:30:25 [INFO] [stdout] | [INFO] [stdout] 30 | mem: T::new(&"asdf"), [INFO] [stdout] | ^^^^^^^ help: change this to: `"asdf"` [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: stripping a prefix manually [INFO] [stdout] --> src/brain.rs:79:29 [INFO] [stdout] | [INFO] [stdout] 79 | return Some(&tail[2..]); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/brain.rs:78:13 [INFO] [stdout] | [INFO] [stdout] 78 | if tail.starts_with(": ") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 78 ~ if let Some() = tail.strip_prefix(": ") { [INFO] [stdout] 79 ~ return Some(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/brain.rs:179:17 [INFO] [stdout] | [INFO] [stdout] 179 | assert!(!brain.create_factoid(&"sidra: foo is bar").is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `brain.create_factoid(&"sidra: foo is bar").is_ok()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/brain.rs:179:39 [INFO] [stdout] | [INFO] [stdout] 179 | assert!(!brain.create_factoid(&"sidra: foo is bar").is_err()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `"sidra: foo is bar"` [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 boolean expression can be simplified [INFO] [stdout] --> src/brain.rs:190:17 [INFO] [stdout] | [INFO] [stdout] 190 | assert!(!brain [INFO] [stdout] | _________________^ [INFO] [stdout] 191 | | .create_factoid(&"sidra: foo is bar".to_string()) [INFO] [stdout] 192 | | .is_err()); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 190 ~ assert!(brain [INFO] [stdout] 191 ~ .create_factoid(&"sidra: foo is bar".to_string()).is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/brain.rs:193:17 [INFO] [stdout] | [INFO] [stdout] 193 | assert!(!brain [INFO] [stdout] | _________________^ [INFO] [stdout] 194 | | .create_factoid(&"sidra: foo is zip".to_string()) [INFO] [stdout] 195 | | .is_err()); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 193 ~ assert!(brain [INFO] [stdout] 194 ~ .create_factoid(&"sidra: foo is zip".to_string()).is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/brain.rs:191:29 [INFO] [stdout] | [INFO] [stdout] 191 | .create_factoid(&"sidra: foo is bar".to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"sidra: foo is bar"` [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: unnecessary use of `to_string` [INFO] [stdout] --> src/brain.rs:194:29 [INFO] [stdout] | [INFO] [stdout] 194 | .create_factoid(&"sidra: foo is zip".to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"sidra: foo is zip"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/brain.rs:208:17 [INFO] [stdout] | [INFO] [stdout] 208 | assert!(!brain [INFO] [stdout] | _________________^ [INFO] [stdout] 209 | | .create_factoid(&"sidra: foo isn't bar".to_string()) [INFO] [stdout] 210 | | .is_err()); [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 208 ~ assert!(brain [INFO] [stdout] 209 ~ .create_factoid(&"sidra: foo isn't bar".to_string()).is_ok()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `to_string` [INFO] [stdout] --> src/brain.rs:209:29 [INFO] [stdout] | [INFO] [stdout] 209 | .create_factoid(&"sidra: foo isn't bar".to_string()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"sidra: foo isn't bar"` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/models.rs:3:10 [INFO] [stdout] | [INFO] [stdout] 3 | #[derive(Queryable)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Queryable` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_queryable_for_factoid` [INFO] [stdout] 4 | pub struct Factoid { [INFO] [stdout] | ------- `Factoid` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Queryable` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Queryable` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Queryable` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/models.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[derive(Insertable)] [INFO] [stdout] | ^--------- [INFO] [stdout] | | [INFO] [stdout] | `Insertable` is not local [INFO] [stdout] | `table` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_insertable_for_newfactoid` [INFO] [stdout] 12 | #[table_name = "brain"] [INFO] [stdout] 13 | pub struct NewFactoid { [INFO] [stdout] | ---------- `NewFactoid` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Insertable` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Insertable` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `Insertable` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/models.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[derive(Insertable)] [INFO] [stdout] | -^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | `Insertable` is not local [INFO] [stdout] | `table` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_insertable_for_newfactoid` [INFO] [stdout] 12 | #[table_name = "brain"] [INFO] [stdout] 13 | pub struct NewFactoid { [INFO] [stdout] | ---------- `NewFactoid` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Insertable` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Insertable` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `Insertable` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/models.rs:11:10 [INFO] [stdout] | [INFO] [stdout] 11 | #[derive(Insertable)] [INFO] [stdout] | ^--------- [INFO] [stdout] | | [INFO] [stdout] | `UndecoratedInsertRecord` is not local [INFO] [stdout] | `table` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_insertable_for_newfactoid` [INFO] [stdout] 12 | #[table_name = "brain"] [INFO] [stdout] 13 | pub struct NewFactoid { [INFO] [stdout] | ---------- `NewFactoid` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Insertable` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Insertable` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `Insertable` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] ... | [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | | `table` is not local [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_table` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] | | -- `id` is not local [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] ... | [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_id` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] | | -------- `fact_key` is not local [INFO] [stdout] ... | [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_fact_key` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] 5 | | fact_pred -> Text, [INFO] [stdout] | | --------- `fact_pred` is not local [INFO] [stdout] ... | [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_fact_pred` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/schema.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / table! { [INFO] [stdout] 2 | | brain (id) { [INFO] [stdout] 3 | | id -> Integer, [INFO] [stdout] 4 | | fact_key -> Text, [INFO] [stdout] 5 | | fact_pred -> Text, [INFO] [stdout] 6 | | fact_val -> Text, [INFO] [stdout] | | -------- `fact_val` is not local [INFO] [stdout] 7 | | } [INFO] [stdout] 8 | | } [INFO] [stdout] | | ^ [INFO] [stdout] | | | [INFO] [stdout] | |_`QueryId` is not local [INFO] [stdout] | move the `impl` block outside of this function `_impl_query_id_for_fact_val` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `QueryId` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `QueryId` may come from an old version of the `diesel_derives` crate, try updating your dependency with `cargo update -p diesel_derives` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `QueryId` which comes from the expansion of the macro `table` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 24.07s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: openssl v0.10.40 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 2` [INFO] running `Command { std: "docker" "inspect" "cee6f2f70688bfa914a39780c3812c29e6d1a0c09f5f86db874b9d0f63d4bbd6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cee6f2f70688bfa914a39780c3812c29e6d1a0c09f5f86db874b9d0f63d4bbd6", kill_on_drop: false }` [INFO] [stdout] cee6f2f70688bfa914a39780c3812c29e6d1a0c09f5f86db874b9d0f63d4bbd6