[INFO] cloning repository https://github.com/Janko-dev/neural_network [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Janko-dev/neural_network" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJanko-dev%2Fneural_network", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJanko-dev%2Fneural_network'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e71d7fbf0640819119b0c70d0f170b9bd2ce4c78 [INFO] linting Janko-dev/neural_network against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJanko-dev%2Fneural_network" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Janko-dev/neural_network [INFO] finished tweaking git repo https://github.com/Janko-dev/neural_network [INFO] tweaked toml for git repo https://github.com/Janko-dev/neural_network written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Janko-dev/neural_network 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/Janko-dev/neural_network already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded svg v0.7.2 [INFO] [stderr] Downloaded serde_derive v1.0.186 [INFO] [stderr] Downloaded plotlib v0.5.1 [INFO] [stderr] Downloaded serde v1.0.186 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 2538ca1d8e0d505acf3c5f7d0147db15acac4274a7ea4be62a9eb15377745b84 [INFO] running `Command { std: "docker" "start" "-a" "2538ca1d8e0d505acf3c5f7d0147db15acac4274a7ea4be62a9eb15377745b84", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2538ca1d8e0d505acf3c5f7d0147db15acac4274a7ea4be62a9eb15377745b84", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2538ca1d8e0d505acf3c5f7d0147db15acac4274a7ea4be62a9eb15377745b84", kill_on_drop: false }` [INFO] [stdout] 2538ca1d8e0d505acf3c5f7d0147db15acac4274a7ea4be62a9eb15377745b84 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 4d512c9c709a982f0d493503d87f2bf5bb3c0b46f2512d24b75a1dd6704af891 [INFO] running `Command { std: "docker" "start" "-a" "4d512c9c709a982f0d493503d87f2bf5bb3c0b46f2512d24b75a1dd6704af891", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.147 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling serde v1.0.186 [INFO] [stderr] Checking svg v0.7.2 [INFO] [stderr] Checking object v0.32.0 [INFO] [stderr] Checking csv-core v0.1.10 [INFO] [stderr] Checking getrandom v0.2.10 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling backtrace v0.3.69 [INFO] [stderr] Compiling synstructure v0.12.6 [INFO] [stderr] Compiling failure_derive v0.1.8 [INFO] [stderr] Checking csv v1.2.2 [INFO] [stderr] Checking failure v0.1.8 [INFO] [stderr] Checking plotlib v0.5.1 [INFO] [stderr] Checking neural_network v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `IndexMut` and `Index` [INFO] [stdout] --> src/dataframe.rs:1:31 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{error::Error, ops::{IndexMut, Index}}; [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 imports: `IndexMut` and `Index` [INFO] [stdout] --> src/dataframe.rs:1:31 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{error::Error, ops::{IndexMut, Index}}; [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: `mat` [INFO] [stdout] --> src/autodiff.rs:235:37 [INFO] [stdout] | [INFO] [stdout] 235 | Operator::Unary(mat, UnaryOpType::Sum) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_mat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `encoding` [INFO] [stdout] --> src/dataframe.rs:61:30 [INFO] [stdout] | [INFO] [stdout] 61 | pub fn encode(&mut self, encoding: EncodingScheme) { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_encoding` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `autodiff::Operator` [INFO] [stdout] --> src/autodiff.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn to_string(&self) -> String { [INFO] [stdout] 37 | | match self { [INFO] [stdout] 38 | | Self::Binary(_, _, BinaryOpType::Add) => "Add".to_string(), [INFO] [stdout] 39 | | Self::Binary(_, _, BinaryOpType::Sub) => "Sub".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 52 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `autodiff::Operator` 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: you should consider adding a `Default` implementation for `GradMap` [INFO] [stdout] --> src/autodiff.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / pub fn new() -> Self { [INFO] [stdout] 60 | | Self(HashMap::new()) [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 58 + impl Default for GradMap { [INFO] [stdout] 59 + fn default() -> Self { [INFO] [stdout] 60 + Self::new() [INFO] [stdout] 61 + } [INFO] [stdout] 62 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/autodiff.rs:168:49 [INFO] [stdout] | [INFO] [stdout] 168 | let lhs_grad = grad.mul(&rhs)?; [INFO] [stdout] | ^^^^ help: change this to: `rhs` [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/autodiff.rs:172:49 [INFO] [stdout] | [INFO] [stdout] 172 | let rhs_grad = grad.mul(&lhs)?; [INFO] [stdout] | ^^^^ help: change this to: `lhs` [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/autodiff.rs:183:101 [INFO] [stdout] | [INFO] [stdout] 183 | let lhs_grad = grad.mul(&Matrix::ones(rhs.shape(), rhs.requires_grad()).div(&rhs)?)?; [INFO] [stdout] | ^^^^ help: change this to: `rhs` [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/autodiff.rs:188:51 [INFO] [stdout] | [INFO] [stdout] 188 | let rhs_squared = rhs.mul(&rhs)?; [INFO] [stdout] | ^^^^ help: change this to: `rhs` [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/autodiff.rs:199:106 [INFO] [stdout] | [INFO] [stdout] 199 | ... let sigmoid_der = node.mul(&Matrix::ones(node.shape(), node.requires_grad()).sub(&node)?)?; [INFO] [stdout] | ^^^^^ help: change this to: `node` [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: unused variable: `mat` [INFO] [stdout] --> src/autodiff.rs:235:37 [INFO] [stdout] | [INFO] [stdout] 235 | Operator::Unary(mat, UnaryOpType::Sum) => { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_mat` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/matrix.rs:1:19 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{rc::Rc, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [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] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/matrix.rs:364:36 [INFO] [stdout] | [INFO] [stdout] 364 | let shape = (rows, 1 as usize); [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> src/matrix.rs:367:26 [INFO] [stdout] | [INFO] [stdout] 367 | for i in 0..rows { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 367 - for i in 0..rows { [INFO] [stdout] 367 + for (i, ) in data.iter_mut().enumerate().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/matrix.rs:375:30 [INFO] [stdout] | [INFO] [stdout] 375 | let shape = (1 as usize, cols); [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `data` [INFO] [stdout] --> src/matrix.rs:378:26 [INFO] [stdout] | [INFO] [stdout] 378 | for j in 0..cols { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 378 - for j in 0..cols { [INFO] [stdout] 378 + for (j, ) in data.iter_mut().enumerate().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `encoding` [INFO] [stdout] --> src/dataframe.rs:61:30 [INFO] [stdout] | [INFO] [stdout] 61 | pub fn encode(&mut self, encoding: EncodingScheme) { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_encoding` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `headers`, `data`, and `shape` are never read [INFO] [stdout] --> src/dataframe.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct DataFrame { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 12 | headers: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 13 | data: Vec, [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | shape: (usize, usize) [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DataFrame` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/matrix.rs:422:1 [INFO] [stdout] | [INFO] [stdout] 422 | impl Into for Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 422 ~ impl From> for Matrix { [INFO] [stdout] 423 ~ fn from(val: Vec) -> Self { [INFO] [stdout] 424 ~ let len = val.len(); [INFO] [stdout] 425 ~ Matrix::from_vec(val, (len, 1), false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/matrix.rs:429:1 [INFO] [stdout] | [INFO] [stdout] 429 | impl Into for &Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From<&std::vec::Vec>` [INFO] [stdout] | [INFO] [stdout] 429 ~ impl From<&Vec> for Matrix { [INFO] [stdout] 430 ~ fn from(val: &Vec) -> Self { [INFO] [stdout] 431 ~ let len = val.len(); [INFO] [stdout] 432 ~ Matrix::from_vec(val.clone(), (len, 1), false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: implementation of inherent method `to_string(&self) -> String` for type `autodiff::Operator` [INFO] [stdout] --> src/autodiff.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn to_string(&self) -> String { [INFO] [stdout] 37 | | match self { [INFO] [stdout] 38 | | Self::Binary(_, _, BinaryOpType::Add) => "Add".to_string(), [INFO] [stdout] 39 | | Self::Binary(_, _, BinaryOpType::Sub) => "Sub".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 52 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: implement trait `Display` for type `autodiff::Operator` 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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/matrix.rs:436:1 [INFO] [stdout] | [INFO] [stdout] 436 | impl Into for Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From>>` [INFO] [stdout] | [INFO] [stdout] 436 ~ impl From>> for Matrix { [INFO] [stdout] 437 ~ fn from(val: Vec>) -> Self { [INFO] [stdout] 438 ~ let rows = val.len(); [INFO] [stdout] 439 ~ let cols = if let Some(cols) = val.get(0) { [INFO] [stdout] 440 | cols.len() [INFO] [stdout] ... [INFO] [stdout] 444 | [INFO] [stdout] 445 ~ for v in val.iter() { [INFO] [stdout] 446 | if v.len() == cols { [INFO] [stdout] ... [INFO] [stdout] 452 | [INFO] [stdout] 453 ~ let data = val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.get(0)` [INFO] [stdout] --> src/matrix.rs:439:40 [INFO] [stdout] | [INFO] [stdout] 439 | let cols = if let Some(cols) = self.get(0) { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `self.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: you should consider adding a `Default` implementation for `GradMap` [INFO] [stdout] --> src/autodiff.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / pub fn new() -> Self { [INFO] [stdout] 60 | | Self(HashMap::new()) [INFO] [stdout] 61 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 58 + impl Default for GradMap { [INFO] [stdout] 59 + fn default() -> Self { [INFO] [stdout] 60 + Self::new() [INFO] [stdout] 61 + } [INFO] [stdout] 62 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/matrix.rs:462:1 [INFO] [stdout] | [INFO] [stdout] 462 | impl Into for &Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From<&std::vec::Vec>>` [INFO] [stdout] | [INFO] [stdout] 462 ~ impl From<&Vec>> for Matrix { [INFO] [stdout] 463 ~ fn from(val: &Vec>) -> Self { [INFO] [stdout] 464 ~ let rows = val.len(); [INFO] [stdout] 465 ~ let cols = if let Some(cols) = val.get(0) { [INFO] [stdout] 466 | cols.len() [INFO] [stdout] ... [INFO] [stdout] 470 | [INFO] [stdout] 471 ~ for v in val.iter() { [INFO] [stdout] 472 | if v.len() == cols { [INFO] [stdout] ... [INFO] [stdout] 478 | [INFO] [stdout] 479 ~ let data = val.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.get(0)` [INFO] [stdout] --> src/matrix.rs:465:40 [INFO] [stdout] | [INFO] [stdout] 465 | let cols = if let Some(cols) = self.get(0) { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `self.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/neural_network.rs:61:18 [INFO] [stdout] | [INFO] [stdout] 61 | x_train: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 61 - x_train: &Vec>, [INFO] [stdout] 61 + x_train: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/autodiff.rs:168:49 [INFO] [stdout] | [INFO] [stdout] 168 | let lhs_grad = grad.mul(&rhs)?; [INFO] [stdout] | ^^^^ help: change this to: `rhs` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/neural_network.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | y_train: &Vec, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - y_train: &Vec, [INFO] [stdout] 62 + y_train: &[f32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/autodiff.rs:172:49 [INFO] [stdout] | [INFO] [stdout] 172 | let rhs_grad = grad.mul(&lhs)?; [INFO] [stdout] | ^^^^ help: change this to: `lhs` [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/autodiff.rs:183:101 [INFO] [stdout] | [INFO] [stdout] 183 | let lhs_grad = grad.mul(&Matrix::ones(rhs.shape(), rhs.requires_grad()).div(&rhs)?)?; [INFO] [stdout] | ^^^^ help: change this to: `rhs` [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: useless conversion to the same type: `rand::seq::SliceChooseIter<'_, [usize], usize>` [INFO] [stdout] --> src/neural_network.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | / (0..training_size) [INFO] [stdout] 97 | | .collect::>() [INFO] [stdout] 98 | | .choose_multiple(&mut rng, batch_size) [INFO] [stdout] 99 | | .into_iter() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 96 ~ (0..training_size) [INFO] [stdout] 97 + .collect::>() [INFO] [stdout] 98 + .choose_multiple(&mut rng, batch_size) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/autodiff.rs:188:51 [INFO] [stdout] | [INFO] [stdout] 188 | let rhs_squared = rhs.mul(&rhs)?; [INFO] [stdout] | ^^^^ help: change this to: `rhs` [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/autodiff.rs:199:106 [INFO] [stdout] | [INFO] [stdout] 199 | ... let sigmoid_der = node.mul(&Matrix::ones(node.shape(), node.requires_grad()).sub(&node)?)?; [INFO] [stdout] | ^^^^^ help: change this to: `node` [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: importing legacy numeric constants [INFO] [stdout] --> src/matrix.rs:1:19 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{rc::Rc, usize}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/dataframe.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | assert!(!df.is_err()); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `df.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: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/matrix.rs:364:36 [INFO] [stdout] | [INFO] [stdout] 364 | let shape = (rows, 1 as usize); [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `data` [INFO] [stdout] --> src/matrix.rs:367:26 [INFO] [stdout] | [INFO] [stdout] 367 | for i in 0..rows { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 367 - for i in 0..rows { [INFO] [stdout] 367 + for (i, ) in data.iter_mut().enumerate().take(rows) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `usize` is unnecessary [INFO] [stdout] --> src/matrix.rs:375:30 [INFO] [stdout] | [INFO] [stdout] 375 | let shape = (1 as usize, cols); [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_usize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `data` [INFO] [stdout] --> src/matrix.rs:378:26 [INFO] [stdout] | [INFO] [stdout] 378 | for j in 0..cols { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 378 - for j in 0..cols { [INFO] [stdout] 378 + for (j, ) in data.iter_mut().enumerate().take(cols) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/matrix.rs:422:1 [INFO] [stdout] | [INFO] [stdout] 422 | impl Into for Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From>` [INFO] [stdout] | [INFO] [stdout] 422 ~ impl From> for Matrix { [INFO] [stdout] 423 ~ fn from(val: Vec) -> Self { [INFO] [stdout] 424 ~ let len = val.len(); [INFO] [stdout] 425 ~ Matrix::from_vec(val, (len, 1), false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/matrix.rs:429:1 [INFO] [stdout] | [INFO] [stdout] 429 | impl Into for &Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From<&std::vec::Vec>` [INFO] [stdout] | [INFO] [stdout] 429 ~ impl From<&Vec> for Matrix { [INFO] [stdout] 430 ~ fn from(val: &Vec) -> Self { [INFO] [stdout] 431 ~ let len = val.len(); [INFO] [stdout] 432 ~ Matrix::from_vec(val.clone(), (len, 1), false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/matrix.rs:436:1 [INFO] [stdout] | [INFO] [stdout] 436 | impl Into for Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From>>` [INFO] [stdout] | [INFO] [stdout] 436 ~ impl From>> for Matrix { [INFO] [stdout] 437 ~ fn from(val: Vec>) -> Self { [INFO] [stdout] 438 ~ let rows = val.len(); [INFO] [stdout] 439 ~ let cols = if let Some(cols) = val.get(0) { [INFO] [stdout] 440 | cols.len() [INFO] [stdout] ... [INFO] [stdout] 444 | [INFO] [stdout] 445 ~ for v in val.iter() { [INFO] [stdout] 446 | if v.len() == cols { [INFO] [stdout] ... [INFO] [stdout] 452 | [INFO] [stdout] 453 ~ let data = val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.get(0)` [INFO] [stdout] --> src/matrix.rs:439:40 [INFO] [stdout] | [INFO] [stdout] 439 | let cols = if let Some(cols) = self.get(0) { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `self.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: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/matrix.rs:462:1 [INFO] [stdout] | [INFO] [stdout] 462 | impl Into for &Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From<&std::vec::Vec>>` [INFO] [stdout] | [INFO] [stdout] 462 ~ impl From<&Vec>> for Matrix { [INFO] [stdout] 463 ~ fn from(val: &Vec>) -> Self { [INFO] [stdout] 464 ~ let rows = val.len(); [INFO] [stdout] 465 ~ let cols = if let Some(cols) = val.get(0) { [INFO] [stdout] 466 | cols.len() [INFO] [stdout] ... [INFO] [stdout] 470 | [INFO] [stdout] 471 ~ for v in val.iter() { [INFO] [stdout] 472 | if v.len() == cols { [INFO] [stdout] ... [INFO] [stdout] 478 | [INFO] [stdout] 479 ~ let data = val.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.get(0)` [INFO] [stdout] --> src/matrix.rs:465:40 [INFO] [stdout] | [INFO] [stdout] 465 | let cols = if let Some(cols) = self.get(0) { [INFO] [stdout] | ^^^^^^^^^^^ help: try: `self.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/neural_network.rs:61:18 [INFO] [stdout] | [INFO] [stdout] 61 | x_train: &Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 61 - x_train: &Vec>, [INFO] [stdout] 61 + x_train: &[Vec], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/neural_network.rs:62:18 [INFO] [stdout] | [INFO] [stdout] 62 | y_train: &Vec, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 62 - y_train: &Vec, [INFO] [stdout] 62 + y_train: &[f32], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `rand::seq::SliceChooseIter<'_, [usize], usize>` [INFO] [stdout] --> src/neural_network.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | / (0..training_size) [INFO] [stdout] 97 | | .collect::>() [INFO] [stdout] 98 | | .choose_multiple(&mut rng, batch_size) [INFO] [stdout] 99 | | .into_iter() [INFO] [stdout] | |________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 96 ~ (0..training_size) [INFO] [stdout] 97 + .collect::>() [INFO] [stdout] 98 + .choose_multiple(&mut rng, batch_size) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Matrix` [INFO] [stdout] --> src/main.rs:3:26 [INFO] [stdout] | [INFO] [stdout] 3 | use neural_network::{NN, Matrix}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/main.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 11 | return Ok(()); [INFO] [stdout] | ------------- any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 40 | / let x_train = vec![ [INFO] [stdout] 41 | | vec![0., 0.], [INFO] [stdout] 42 | | vec![0., 1.], [INFO] [stdout] 43 | | vec![1., 0.], [INFO] [stdout] 44 | | vec![1., 1.], [INFO] [stdout] 45 | | ]; [INFO] [stdout] | |______^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> examples/xor/main.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | const SVG_PATH: &'static str = "examples/xor/xor_nn_loss.svg"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> examples/iris/main.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 13 | const SVG_PATH: &'static str = "examples/iris/iris_nn_loss.svg"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> examples/iris/main.rs:29:14 [INFO] [stdout] | [INFO] [stdout] 29 | .map(|x| drop [INFO] [stdout] | ______________^ [INFO] [stdout] 30 | | .iter() [INFO] [stdout] 31 | | .map(move |&y| (x, y)) [INFO] [stdout] 32 | | ) [INFO] [stdout] 33 | | .flatten() [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] help: try replacing `map` with `flat_map` and remove the `.flatten()` [INFO] [stdout] | [INFO] [stdout] 29 ~ .flat_map(|x| drop [INFO] [stdout] 30 + .iter() [INFO] [stdout] 31 + .map(move |&y| (x, y))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> examples/iris/main.rs:56:62 [INFO] [stdout] | [INFO] [stdout] 56 | fn partition_labels(table: Vec>, y_index: usize) -> Result<(Vec>, Vec), Box> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `input_dataset` [INFO] [stdout] --> examples/iris/main.rs:87:14 [INFO] [stdout] | [INFO] [stdout] 87 | for i in 45..55 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 87 - for i in 45..55 { [INFO] [stdout] 87 + for (i, ) in input_dataset.iter().enumerate().take(55).skip(45) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Matrix` [INFO] [stdout] --> src/main.rs:3:26 [INFO] [stdout] | [INFO] [stdout] 3 | use neural_network::{NN, Matrix}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> src/main.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 11 | return Ok(()); [INFO] [stdout] | ------------- any code following this expression is unreachable [INFO] [stdout] ... [INFO] [stdout] 40 | / let x_train = vec![ [INFO] [stdout] 41 | | vec![0., 0.], [INFO] [stdout] 42 | | vec![0., 1.], [INFO] [stdout] 43 | | vec![1., 0.], [INFO] [stdout] 44 | | vec![1., 1.], [INFO] [stdout] 45 | | ]; [INFO] [stdout] | |______^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.76s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: svg v0.7.2 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 4` [INFO] running `Command { std: "docker" "inspect" "4d512c9c709a982f0d493503d87f2bf5bb3c0b46f2512d24b75a1dd6704af891", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4d512c9c709a982f0d493503d87f2bf5bb3c0b46f2512d24b75a1dd6704af891", kill_on_drop: false }` [INFO] [stdout] 4d512c9c709a982f0d493503d87f2bf5bb3c0b46f2512d24b75a1dd6704af891