[INFO] cloning repository https://github.com/ulloacastillo/wasm-decision-tree [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/ulloacastillo/wasm-decision-tree" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Fwasm-decision-tree", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Fwasm-decision-tree'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c218f526ad4ebfd2b28dde09554450598eddcb7a [INFO] checking ulloacastillo/wasm-decision-tree against master#385fa9d845dd326c6bbfd58c22244215e431948a for absurd-question-mark-desugar [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fulloacastillo%2Fwasm-decision-tree" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/ulloacastillo/wasm-decision-tree on toolchain 385fa9d845dd326c6bbfd58c22244215e431948a [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+385fa9d845dd326c6bbfd58c22244215e431948a" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/ulloacastillo/wasm-decision-tree [INFO] finished tweaking git repo https://github.com/ulloacastillo/wasm-decision-tree [INFO] tweaked toml for git repo https://github.com/ulloacastillo/wasm-decision-tree written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/ulloacastillo/wasm-decision-tree 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" "+385fa9d845dd326c6bbfd58c22244215e431948a" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+385fa9d845dd326c6bbfd58c22244215e431948a" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e156929a7de607d46b951607b92b4f918d401cbdf5d65a6e79d36cb4e085e6b7 [INFO] running `Command { std: "docker" "start" "-a" "e156929a7de607d46b951607b92b4f918d401cbdf5d65a6e79d36cb4e085e6b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e156929a7de607d46b951607b92b4f918d401cbdf5d65a6e79d36cb4e085e6b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e156929a7de607d46b951607b92b4f918d401cbdf5d65a6e79d36cb4e085e6b7", kill_on_drop: false }` [INFO] [stdout] e156929a7de607d46b951607b92b4f918d401cbdf5d65a6e79d36cb4e085e6b7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+385fa9d845dd326c6bbfd58c22244215e431948a" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4c4e569b2560fc950518bcfe2508708e1d80536cf43b101ec82071fd6eb1bf4f [INFO] running `Command { std: "docker" "start" "-a" "4c4e569b2560fc950518bcfe2508708e1d80536cf43b101ec82071fd6eb1bf4f", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.39 [INFO] [stderr] Compiling unicode-ident v1.0.1 [INFO] [stderr] Compiling syn v1.0.96 [INFO] [stderr] Compiling serde_derive v1.0.137 [INFO] [stderr] Compiling serde v1.0.137 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Compiling wasm-bindgen-shared v0.2.81 [INFO] [stderr] Compiling libc v0.2.126 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling bumpalo v3.10.0 [INFO] [stderr] Checking ryu v1.0.10 [INFO] [stderr] Compiling serde_json v1.0.81 [INFO] [stderr] Checking ppv-lite86 v0.2.16 [INFO] [stderr] Checking regex-automata v0.1.10 [INFO] [stderr] Checking itoa v1.0.2 [INFO] [stderr] Compiling wasm-bindgen v0.2.81 [INFO] [stderr] Checking itoa v0.4.8 [INFO] [stderr] Compiling quote v1.0.18 [INFO] [stderr] Checking csv-core v0.1.10 [INFO] [stderr] Checking getrandom v0.2.7 [INFO] [stderr] Checking rand_core v0.6.3 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling wasm-bindgen-backend v0.2.81 [INFO] [stderr] Compiling wasm-bindgen-macro-support v0.2.81 [INFO] [stderr] Compiling wasm-bindgen-macro v0.2.81 [INFO] [stderr] Checking bstr v0.2.17 [INFO] [stderr] Checking csv v1.1.6 [INFO] [stderr] Checking wasm-dtree v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/lib.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/lib.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::File` [INFO] [stdout] --> src/lib.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::File; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `csv::Error` [INFO] [stdout] --> src/lib.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use csv::Error; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/lib.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/lib.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/lib.rs:113:75 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/lib.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `X_test` [INFO] [stdout] --> src/lib.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_X_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BestSplitStruct` is never constructed [INFO] [stdout] --> src/lib.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | struct BestSplitStruct { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num_samples` [INFO] [stdout] --> src/lib.rs:113:75 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_num_samples` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lib.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 48 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 49 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/lib.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 70 | impl DecisionTreeClassifier { [INFO] [stdout] | ---------------------------- associated items in this implementation [INFO] [stdout] 71 | pub fn new(mss: usize, md: usize) -> Self{ [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn information_gain(&mut self, parent: &Vec, l_child: &Vec, r_child: &Vec) -> f32{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/lib.rs:280:4 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/lib.rs:315:4 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:79:34 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:79:53 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:113:38 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:113:57 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:158:34 [INFO] [stdout] | [INFO] [stdout] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:174:29 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:174:48 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:209:44 [INFO] [stdout] | [INFO] [stdout] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:233:27 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:233:46 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:237:35 [INFO] [stdout] | [INFO] [stdout] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:259:27 [INFO] [stdout] | [INFO] [stdout] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:280:18 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:280:41 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:284:13 [INFO] [stdout] | [INFO] [stdout] 284 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/lib.rs:285:13 [INFO] [stdout] | [INFO] [stdout] 285 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/lib.rs:287:13 [INFO] [stdout] | [INFO] [stdout] 287 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n_test` [INFO] [stdout] --> src/lib.rs:282:9 [INFO] [stdout] | [INFO] [stdout] 282 | let n_test = X.len() - n_train; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_n_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:315:23 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/lib.rs:315:40 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `X_test` [INFO] [stdout] --> src/lib.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_X_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `BestSplitStruct` is never constructed [INFO] [stdout] --> src/lib.rs:28:8 [INFO] [stdout] | [INFO] [stdout] 28 | struct BestSplitStruct { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/lib.rs:49:12 [INFO] [stdout] | [INFO] [stdout] 48 | impl Node{ [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 49 | pub fn new(fi: usize, th: f32, v: String) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple associated items are never used [INFO] [stdout] --> src/lib.rs:71:12 [INFO] [stdout] | [INFO] [stdout] 70 | impl DecisionTreeClassifier { [INFO] [stdout] | ---------------------------- associated items in this implementation [INFO] [stdout] 71 | pub fn new(mss: usize, md: usize) -> Self{ [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 199 | pub fn information_gain(&mut self, parent: &Vec, l_child: &Vec, r_child: &Vec) -> f32{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `split_dataset` is never used [INFO] [stdout] --> src/lib.rs:280:4 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `accuracy_per_label` is never used [INFO] [stdout] --> src/lib.rs:315:4 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `set_panic_hook` is never used [INFO] [stdout] --> src/utils.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn set_panic_hook() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals` is never used [INFO] [stdout] --> src/utils.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn unique_vals(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unique_vals_f32` is never used [INFO] [stdout] --> src/utils.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn unique_vals_f32(arr: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `count_vals` is never used [INFO] [stdout] --> src/utils.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn count_vals(arr: &Vec, label: String) -> usize { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `get_column` is never used [INFO] [stdout] --> src/utils.rs:43:8 [INFO] [stdout] | [INFO] [stdout] 43 | pub fn get_column(matrix: &Vec>, col: usize) -> Vec{ [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:79:34 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:79:53 [INFO] [stdout] | [INFO] [stdout] 79 | pub fn build_tree(&mut self, X: &Vec>, Y: &Vec, curr_depth: usize) -> Option>{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:113:38 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:113:57 [INFO] [stdout] | [INFO] [stdout] 113 | pub fn get_best_split(&mut self, X: &Vec>, Y: &Vec, num_samples: usize, num_features: usize) -> BestSplitStruct{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:158:34 [INFO] [stdout] | [INFO] [stdout] 158 | pub fn gini_index(&mut self, Y: &Vec) -> f32 { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:174:29 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:174:48 [INFO] [stdout] | [INFO] [stdout] 174 | pub fn split(&mut self, X: &Vec>, Y: &Vec, feature_index: usize, threshold: f32) -> (Vec>, Vec>, V... [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:209:44 [INFO] [stdout] | [INFO] [stdout] 209 | pub fn calculate_leaf_value(&mut self, Y: &Vec ) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 37 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:233:27 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:233:46 [INFO] [stdout] | [INFO] [stdout] 233 | pub fn fit(&mut self, X: &Vec>, Y: &Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:237:35 [INFO] [stdout] | [INFO] [stdout] 237 | pub fn make_prediction(&self, X: &Vec, tree: &Option>) -> String{ [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:259:27 [INFO] [stdout] | [INFO] [stdout] 259 | pub fn predict(&self, X: &Vec>) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X` should have a snake case name [INFO] [stdout] --> src/lib.rs:280:18 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:280:41 [INFO] [stdout] | [INFO] [stdout] 280 | fn split_dataset(X: &mut Vec>, Y: &mut Vec, train_size: f32) -> (Vec>, Vec, Vec>,Vec) { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:284:13 [INFO] [stdout] | [INFO] [stdout] 284 | let mut X_test: Vec> = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_train` should have a snake case name [INFO] [stdout] --> src/lib.rs:285:13 [INFO] [stdout] | [INFO] [stdout] 285 | let mut X_train: Vec> = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:286:13 [INFO] [stdout] | [INFO] [stdout] 286 | let mut Y_test: Vec = vec![]; [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_train` should have a snake case name [INFO] [stdout] --> src/lib.rs:287:13 [INFO] [stdout] | [INFO] [stdout] 287 | let mut Y_train: Vec = vec![]; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_train` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y` should have a snake case name [INFO] [stdout] --> src/lib.rs:315:23 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^ help: convert the identifier to snake case (notice the capitalization): `y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Y_hat` should have a snake case name [INFO] [stdout] --> src/lib.rs:315:40 [INFO] [stdout] | [INFO] [stdout] 315 | fn accuracy_per_label(Y: &Vec, Y_hat: &Vec) -> Vec { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `y_hat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `X_test` should have a snake case name [INFO] [stdout] --> src/lib.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let X_test: Vec> = vec![vec![5.0,3.4,1.5,0.2], vec![4.4,2.9,1.4,0.2], vec![4.9,3.1,1.5,0.1], vec![5.6,2.9,3.6,1.3], vec![6.2... [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case (notice the capitalization): `x_test` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 37 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.52s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.81 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "4c4e569b2560fc950518bcfe2508708e1d80536cf43b101ec82071fd6eb1bf4f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4c4e569b2560fc950518bcfe2508708e1d80536cf43b101ec82071fd6eb1bf4f", kill_on_drop: false }` [INFO] [stdout] 4c4e569b2560fc950518bcfe2508708e1d80536cf43b101ec82071fd6eb1bf4f