[INFO] cloning repository https://github.com/fastann/fastann [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/fastann/fastann" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffastann%2Ffastann", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffastann%2Ffastann'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f2d2bfe4fd19a2c6d5c3011c59400543bee679ae [INFO] checking fastann/fastann against master#36ecbc94eb6be90bc38b2d0fdd4bfac3f34d9923 for pr-81863 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffastann%2Ffastann" "/workspace/builds/worker-6/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/fastann/fastann on toolchain 36ecbc94eb6be90bc38b2d0fdd4bfac3f34d9923 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+36ecbc94eb6be90bc38b2d0fdd4bfac3f34d9923" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/fastann/fastann [INFO] finished tweaking git repo https://github.com/fastann/fastann [INFO] tweaked toml for git repo https://github.com/fastann/fastann written to /workspace/builds/worker-6/source/Cargo.toml [INFO] crate git repo https://github.com/fastann/fastann already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+36ecbc94eb6be90bc38b2d0fdd4bfac3f34d9923" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/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" "rustops/crates-build-env@sha256:ce6408862c0f4858e6cd2b85b2cf085ff7d0d6323904d0a94b71664a228554ab" "/opt/rustwide/cargo-home/bin/cargo" "+36ecbc94eb6be90bc38b2d0fdd4bfac3f34d9923" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b91176474efcd1156324bd0330433df6f8c314df86c098ca6105a7b188296df9 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "b91176474efcd1156324bd0330433df6f8c314df86c098ca6105a7b188296df9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b91176474efcd1156324bd0330433df6f8c314df86c098ca6105a7b188296df9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b91176474efcd1156324bd0330433df6f8c314df86c098ca6105a7b188296df9", kill_on_drop: false }` [INFO] [stdout] b91176474efcd1156324bd0330433df6f8c314df86c098ca6105a7b188296df9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/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" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "rustops/crates-build-env@sha256:ce6408862c0f4858e6cd2b85b2cf085ff7d0d6323904d0a94b71664a228554ab" "/opt/rustwide/cargo-home/bin/cargo" "+36ecbc94eb6be90bc38b2d0fdd4bfac3f34d9923" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9698568e0471e41a98a788bf87d05e60229990fd627238bccfb7da383b6899b5 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "9698568e0471e41a98a788bf87d05e60229990fd627238bccfb7da383b6899b5", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.79 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling num-bigint v0.3.1 [INFO] [stderr] Compiling num-iter v0.1.42 [INFO] [stderr] Compiling num-rational v0.3.2 [INFO] [stderr] Checking getrandom v0.1.15 [INFO] [stderr] Checking num-complex v0.3.1 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking num v0.3.1 [INFO] [stderr] Checking fastann v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> src/annoy/annoy.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp::Ordering; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/annoy/annoy.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy` [INFO] [stdout] --> src/bench/bench.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::annoy; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy::annoy::AnnoyIndexer` [INFO] [stdout] --> src/bench/bench.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::annoy::annoy::AnnoyIndexer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::hnsw` [INFO] [stdout] --> src/bench/bench.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::hnsw; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Alphanumeric`, `Uniform` [INFO] [stdout] --> src/bench/bench.rs:8:27 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Normal` [INFO] [stdout] --> src/bench/bench.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::seq::SliceRandom` [INFO] [stdout] --> src/bench/bench.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use rand::seq::SliceRandom; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/bench/bench.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/bench/bench.rs:138:20 [INFO] [stdout] | [INFO] [stdout] 138 | if (idx % 100000 == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::core::metrics::manhattan_distance` [INFO] [stdout] --> src/core/node.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::core::metrics::manhattan_distance; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/core/node.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/core/node.rs:67:16 [INFO] [stdout] | [INFO] [stdout] 67 | if (Node::valid_elements(x)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::core::node` [INFO] [stdout] --> src/core/parameters.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::core::node; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy::random` [INFO] [stdout] --> src/flat/flat.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::annoy::random; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Reverse` [INFO] [stdout] --> src/flat/flat.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::cmp::Reverse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/hnsw/hnsw.rs:75:15 [INFO] [stdout] | [INFO] [stdout] 75 | while (ret < self._max_level) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/pq/pq.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::Normal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:41:53 [INFO] [stdout] | [INFO] [stdout] 41 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:51:53 [INFO] [stdout] | [INFO] [stdout] 51 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> src/annoy/annoy.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp::Ordering; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/annoy/annoy.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy` [INFO] [stdout] --> src/bench/bench.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::annoy; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy::annoy::AnnoyIndexer` [INFO] [stdout] --> src/bench/bench.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::annoy::annoy::AnnoyIndexer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::hnsw` [INFO] [stdout] --> src/bench/bench.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::hnsw; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Alphanumeric`, `Uniform` [INFO] [stdout] --> src/bench/bench.rs:8:27 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Normal` [INFO] [stdout] --> src/bench/bench.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::seq::SliceRandom` [INFO] [stdout] --> src/bench/bench.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use rand::seq::SliceRandom; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/bench/bench.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/bench/bench.rs:138:20 [INFO] [stdout] | [INFO] [stdout] 138 | if (idx % 100000 == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/core/node.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/core/node.rs:67:16 [INFO] [stdout] | [INFO] [stdout] 67 | if (Node::valid_elements(x)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::core::node` [INFO] [stdout] --> src/core/parameters.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::core::node; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy::random` [INFO] [stdout] --> src/flat/flat.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::annoy::random; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Reverse` [INFO] [stdout] --> src/flat/flat.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::cmp::Reverse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/hnsw/hnsw.rs:75:15 [INFO] [stdout] | [INFO] [stdout] 75 | while (ret < self._max_level) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashSet` [INFO] [stdout] --> src/pq/pq.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::HashSet; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::Normal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:41:53 [INFO] [stdout] | [INFO] [stdout] 41 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:51:53 [INFO] [stdout] | [INFO] [stdout] 51 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Distribution` [INFO] [stdout] --> src/bench/bench.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Manhattan` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Manhattan` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bindings_with_variant_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Dot` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: to match on the variant, qualify the path: `MetricType::Dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Euclidean` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Unknown` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ unreachable pattern [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] ... [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:130:26 [INFO] [stdout] | [INFO] [stdout] 130 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | fn zero_value(&self, src: &mut Leaf) {} [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:152:25 [INFO] [stdout] | [INFO] [stdout] 152 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:158:20 [INFO] [stdout] | [INFO] [stdout] 158 | fn side(&self, src: &Leaf, dst: &[E]) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dst` [INFO] [stdout] --> src/annoy/annoy.rs:158:35 [INFO] [stdout] | [INFO] [stdout] 158 | fn side(&self, src: &Leaf, dst: &[E]) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:162:22 [INFO] [stdout] | [INFO] [stdout] 162 | fn margin(&self, src: &Leaf, dst: &[E]) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dst` [INFO] [stdout] --> src/annoy/annoy.rs:162:37 [INFO] [stdout] | [INFO] [stdout] 162 | fn margin(&self, src: &Leaf, dst: &[E]) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `distance` [INFO] [stdout] --> src/annoy/annoy.rs:166:27 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_distance` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `margin` [INFO] [stdout] --> src/annoy/annoy.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_margin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `child_nr` [INFO] [stdout] --> src/annoy/annoy.rs:166:55 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_child_nr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `filename` [INFO] [stdout] --> src/annoy/annoy.rs:318:20 [INFO] [stdout] | [INFO] [stdout] 318 | fn save(&self, filename: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_filename` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:324:28 [INFO] [stdout] | [INFO] [stdout] 324 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/annoy/annoy.rs:324:36 [INFO] [stdout] | [INFO] [stdout] 324 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/annoy/annoy.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | idx: i32, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/annoy.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | n: usize, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `search_k` [INFO] [stdout] --> src/annoy/annoy.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | search_k: i32, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/annoy/annoy.rs:337:9 [INFO] [stdout] | [INFO] [stdout] 337 | f: &[E], [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/annoy.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | n: usize, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `search_k` [INFO] [stdout] --> src/annoy/annoy.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | search_k: i32, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/annoy/annoy.rs:349:23 [INFO] [stdout] | [INFO] [stdout] 349 | fn verbose(&self, v: bool) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/annoy/annoy.rs:350:24 [INFO] [stdout] | [INFO] [stdout] 350 | fn get_item(&self, item: E) -> Result { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `q` [INFO] [stdout] --> src/annoy/annoy.rs:353:28 [INFO] [stdout] | [INFO] [stdout] 353 | fn set_seed(&mut self, q: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:224:17 [INFO] [stdout] | [INFO] [stdout] 224 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:257:17 [INFO] [stdout] | [INFO] [stdout] 257 | Err(e) => return, // do nothing [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:304:25 [INFO] [stdout] | [INFO] [stdout] 304 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/annoy/annoy.rs:380:28 [INFO] [stdout] | [INFO] [stdout] 380 | fn add_item(&mut self, item: i32, w: &[E], d: D) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:511:17 [INFO] [stdout] | [INFO] [stdout] 511 | for i in 0..diff { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:555:21 [INFO] [stdout] | [INFO] [stdout] 555 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:613:13 [INFO] [stdout] | [INFO] [stdout] 613 | for i in 0..attempt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:671:21 [INFO] [stdout] | [INFO] [stdout] 671 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:708:13 [INFO] [stdout] | [INFO] [stdout] 708 | let leaf: Leaf = Leaf::new(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/random.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn set_seed(n: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | for i in 0..clustering_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..dimension { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | for i in 0..node_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 0..test_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `base` [INFO] [stdout] --> src/bench/bench.rs:99:10 [INFO] [stdout] | [INFO] [stdout] 99 | let (base, ns, ts) = make_normal_distribution_clustering(5, 1000, 1, 2, 100.0); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_base` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | for i in 0..K { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Manhattan` [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Manhattan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Dot` [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_Dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Euclidean` [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Unknown` [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/flat/flat.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn new(p: parameters::Parameters) -> FlatIndex { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/flat/flat.rs:80:20 [INFO] [stdout] | [INFO] [stdout] 80 | fn load(&self, path: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/flat/flat.rs:84:20 [INFO] [stdout] | [INFO] [stdout] 84 | fn dump(&self, path: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/hnsw/hnsw.rs:256:25 [INFO] [stdout] | [INFO] [stdout] 256 | for k in 0..n_neigh { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/hnsw/hnsw.rs:417:13 [INFO] [stdout] | [INFO] [stdout] 417 | for i in 0..cur_level { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pq/pq.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | for i in 0..demension { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pq/pq.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | for i in 0..n_center { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/pq/pq.rs:115:17 [INFO] [stdout] | [INFO] [stdout] 115 | for j in 0..demension { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pq/pq.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | for i in 0..n_center { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `demension` [INFO] [stdout] --> src/pq/pq.rs:152:13 [INFO] [stdout] | [INFO] [stdout] 152 | let demension = self._demension; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_demension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pq/pq.rs:306:13 [INFO] [stdout] | [INFO] [stdout] 306 | for i in 0..n_sub { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/annoy/annoy.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Distribution` [INFO] [stdout] --> src/bench/bench.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Manhattan` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Manhattan` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bindings_with_variant_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Dot` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: to match on the variant, qualify the path: `MetricType::Dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Euclidean` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Unknown` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ unreachable pattern [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] ... [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:130:26 [INFO] [stdout] | [INFO] [stdout] 130 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | fn zero_value(&self, src: &mut Leaf) {} [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:152:25 [INFO] [stdout] | [INFO] [stdout] 152 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:158:20 [INFO] [stdout] | [INFO] [stdout] 158 | fn side(&self, src: &Leaf, dst: &[E]) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dst` [INFO] [stdout] --> src/annoy/annoy.rs:158:35 [INFO] [stdout] | [INFO] [stdout] 158 | fn side(&self, src: &Leaf, dst: &[E]) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:162:22 [INFO] [stdout] | [INFO] [stdout] 162 | fn margin(&self, src: &Leaf, dst: &[E]) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dst` [INFO] [stdout] --> src/annoy/annoy.rs:162:37 [INFO] [stdout] | [INFO] [stdout] 162 | fn margin(&self, src: &Leaf, dst: &[E]) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `distance` [INFO] [stdout] --> src/annoy/annoy.rs:166:27 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_distance` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `margin` [INFO] [stdout] --> src/annoy/annoy.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_margin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `child_nr` [INFO] [stdout] --> src/annoy/annoy.rs:166:55 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_child_nr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `filename` [INFO] [stdout] --> src/annoy/annoy.rs:318:20 [INFO] [stdout] | [INFO] [stdout] 318 | fn save(&self, filename: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_filename` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:324:28 [INFO] [stdout] | [INFO] [stdout] 324 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/annoy/annoy.rs:324:36 [INFO] [stdout] | [INFO] [stdout] 324 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/annoy/annoy.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | idx: i32, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/annoy.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | n: usize, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `search_k` [INFO] [stdout] --> src/annoy/annoy.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | search_k: i32, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/annoy/annoy.rs:337:9 [INFO] [stdout] | [INFO] [stdout] 337 | f: &[E], [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/annoy.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | n: usize, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `search_k` [INFO] [stdout] --> src/annoy/annoy.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | search_k: i32, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/annoy/annoy.rs:349:23 [INFO] [stdout] | [INFO] [stdout] 349 | fn verbose(&self, v: bool) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/annoy/annoy.rs:350:24 [INFO] [stdout] | [INFO] [stdout] 350 | fn get_item(&self, item: E) -> Result { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `q` [INFO] [stdout] --> src/annoy/annoy.rs:353:28 [INFO] [stdout] | [INFO] [stdout] 353 | fn set_seed(&mut self, q: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:224:17 [INFO] [stdout] | [INFO] [stdout] 224 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:257:17 [INFO] [stdout] | [INFO] [stdout] 257 | Err(e) => return, // do nothing [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:304:25 [INFO] [stdout] | [INFO] [stdout] 304 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/annoy/annoy.rs:380:28 [INFO] [stdout] | [INFO] [stdout] 380 | fn add_item(&mut self, item: i32, w: &[E], d: D) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:511:17 [INFO] [stdout] | [INFO] [stdout] 511 | for i in 0..diff { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:555:21 [INFO] [stdout] | [INFO] [stdout] 555 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:613:13 [INFO] [stdout] | [INFO] [stdout] 613 | for i in 0..attempt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:671:21 [INFO] [stdout] | [INFO] [stdout] 671 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:708:13 [INFO] [stdout] | [INFO] [stdout] 708 | let leaf: Leaf = Leaf::new(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/random.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn set_seed(n: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | for i in 0..clustering_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..dimension { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | for i in 0..node_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 0..test_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `base` [INFO] [stdout] --> src/bench/bench.rs:99:10 [INFO] [stdout] | [INFO] [stdout] 99 | let (base, ns, ts) = make_normal_distribution_clustering(5, 1000, 1, 2, 100.0); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_base` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | for i in 0..K { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Manhattan` [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Manhattan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Dot` [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_Dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Euclidean` [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Unknown` [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/flat/flat.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn new(p: parameters::Parameters) -> FlatIndex { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/flat/flat.rs:80:20 [INFO] [stdout] | [INFO] [stdout] 80 | fn load(&self, path: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/flat/flat.rs:84:20 [INFO] [stdout] | [INFO] [stdout] 84 | fn dump(&self, path: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/hnsw/hnsw.rs:256:25 [INFO] [stdout] | [INFO] [stdout] 256 | for k in 0..n_neigh { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/hnsw/hnsw.rs:417:13 [INFO] [stdout] | [INFO] [stdout] 417 | for i in 0..cur_level { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pq/pq.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | for i in 0..demension { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pq/pq.rs:113:13 [INFO] [stdout] | [INFO] [stdout] 113 | for i in 0..n_center { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/pq/pq.rs:115:17 [INFO] [stdout] | [INFO] [stdout] 115 | for j in 0..demension { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pq/pq.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | for i in 0..n_center { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `demension` [INFO] [stdout] --> src/pq/pq.rs:152:13 [INFO] [stdout] | [INFO] [stdout] 152 | let demension = self._demension; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_demension` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/pq/pq.rs:306:13 [INFO] [stdout] | [INFO] [stdout] 306 | for i in 0..n_sub { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/hnsw/hnsw.rs:415:13 [INFO] [stdout] | [INFO] [stdout] 415 | let mut neigh0: Vec = Vec::new(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/annoy/annoy.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: private trait `Element` in public interface (error E0445) [INFO] [stdout] --> src/core/node.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | / pub trait FloatElement: Element + num::Float { [INFO] [stdout] 29 | | fn float_one() -> Self { [INFO] [stdout] 30 | | return Self::from_f32(1.0).unwrap(); [INFO] [stdout] 31 | | } [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(private_in_public)]` on by default [INFO] [stdout] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! [INFO] [stdout] = note: for more information, see issue #34537 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn new_with_vectors(_v: &[E]) -> Leaf { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `copy` [INFO] [stdout] --> src/annoy/annoy.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_literal` [INFO] [stdout] --> src/annoy/annoy.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn get_literal(&self) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/annoy/annoy.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:274:8 [INFO] [stdout] | [INFO] [stdout] 274 | fn normalize_distances(&self, distance: E) -> E { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:281:8 [INFO] [stdout] | [INFO] [stdout] 281 | fn pq_initial_value(&self) -> E { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:285:8 [INFO] [stdout] | [INFO] [stdout] 285 | fn name(&self) -> &'static str { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/annoy/annoy.rs:471:12 [INFO] [stdout] | [INFO] [stdout] 471 | pub fn new(f: usize, d: D) -> AnnoyIndex { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_f` [INFO] [stdout] --> src/annoy/annoy.rs:483:12 [INFO] [stdout] | [INFO] [stdout] 483 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_K` [INFO] [stdout] --> src/annoy/annoy.rs:487:12 [INFO] [stdout] | [INFO] [stdout] 487 | pub fn get_K(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `show_trees` [INFO] [stdout] --> src/annoy/annoy.rs:782:12 [INFO] [stdout] | [INFO] [stdout] 782 | pub fn show_trees(&self) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Dot` [INFO] [stdout] --> src/core/metrics.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | Dot, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `euclidean_distance_range` [INFO] [stdout] --> src/core/metrics.rs:78:8 [INFO] [stdout] | [INFO] [stdout] 78 | pub fn euclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/core/node.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn distance(&self, other: &Node, cal: F) -> Result [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `dimension` [INFO] [stdout] --> src/core/parameters.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | dimension: usize, // dimension [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `m` [INFO] [stdout] --> src/core/parameters.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | m: metrics::MetricType, // metric type [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/hnsw/hnsw.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | fn new() -> Data { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/hnsw/hnsw.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/hnsw/hnsw.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/hnsw/hnsw.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn new(demension: usize) -> HnswIndexer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_random_level` [INFO] [stdout] --> src/hnsw/hnsw.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | fn get_random_level(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_neighbors_by_heuristic2` [INFO] [stdout] --> src/hnsw/hnsw.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | fn get_neighbors_by_heuristic2( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | fn get_neighbor(&self, id: usize, level: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `clear_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | fn clear_neighbor(&mut self, id: usize, level: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `set_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | fn set_neighbor(&mut self, id: usize, level: usize, pos: usize, neighbor_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `push_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:158:8 [INFO] [stdout] | [INFO] [stdout] 158 | fn push_neighbor(&mut self, id: usize, level: usize, neighbor_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_level` [INFO] [stdout] --> src/hnsw/hnsw.rs:166:8 [INFO] [stdout] | [INFO] [stdout] 166 | fn get_level(&self, id: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `connect_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | fn connect_neighbor( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `delete_id` [INFO] [stdout] --> src/hnsw/hnsw.rs:272:12 [INFO] [stdout] | [INFO] [stdout] 272 | pub fn delete_id(&mut self, id: usize) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `is_deleted` [INFO] [stdout] --> src/hnsw/hnsw.rs:283:12 [INFO] [stdout] | [INFO] [stdout] 283 | pub fn is_deleted(&self, id: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_data` [INFO] [stdout] --> src/hnsw/hnsw.rs:287:12 [INFO] [stdout] | [INFO] [stdout] 287 | pub fn get_data(&self, id: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_vec` [INFO] [stdout] --> src/hnsw/hnsw.rs:291:12 [INFO] [stdout] | [INFO] [stdout] 291 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_id` [INFO] [stdout] --> src/hnsw/hnsw.rs:295:12 [INFO] [stdout] | [INFO] [stdout] 295 | pub fn get_distance_from_id(&self, x: usize, y: usize) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_laryer` [INFO] [stdout] --> src/hnsw/hnsw.rs:300:12 [INFO] [stdout] | [INFO] [stdout] 300 | pub fn search_laryer( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_laryer_default` [INFO] [stdout] --> src/hnsw/hnsw.rs:360:12 [INFO] [stdout] | [INFO] [stdout] 360 | pub fn search_laryer_default( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_knn` [INFO] [stdout] --> src/hnsw/hnsw.rs:369:12 [INFO] [stdout] | [INFO] [stdout] 369 | pub fn search_knn( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `init_item` [INFO] [stdout] --> src/hnsw/hnsw.rs:412:12 [INFO] [stdout] | [INFO] [stdout] 412 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `add_item` [INFO] [stdout] --> src/hnsw/hnsw.rs:430:12 [INFO] [stdout] | [INFO] [stdout] 430 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/pq/pq.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | fn new() -> Data { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/pq/pq.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/pq/pq.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/pq/pq.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn new(demension: usize, n_center: usize, _n_epoch: usize) -> KmeansIndexer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_vec` [INFO] [stdout] --> src/pq/pq.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `init_center` [INFO] [stdout] --> src/pq/pq.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn init_center(&mut self, batch_size: usize, batch_data: &Vec>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `update_center` [INFO] [stdout] --> src/pq/pq.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | fn update_center( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_data` [INFO] [stdout] --> src/pq/pq.rs:145:8 [INFO] [stdout] | [INFO] [stdout] 145 | fn search_data( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `split_center` [INFO] [stdout] --> src/pq/pq.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | fn split_center( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `train` [INFO] [stdout] --> src/pq/pq.rs:212:12 [INFO] [stdout] | [INFO] [stdout] 212 | pub fn train(&mut self, batch_size: usize, batch_data: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `set_range` [INFO] [stdout] --> src/pq/pq.rs:226:12 [INFO] [stdout] | [INFO] [stdout] 226 | pub fn set_range(&mut self, begin: usize, end: usize) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/pq/pq.rs:255:12 [INFO] [stdout] | [INFO] [stdout] 255 | pub fn new(demension: usize, n_sub: usize, sub_bits: usize, train_epoch: usize) -> PQIndexer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `init_item` [INFO] [stdout] --> src/pq/pq.rs:278:12 [INFO] [stdout] | [INFO] [stdout] 278 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `add_item` [INFO] [stdout] --> src/pq/pq.rs:286:12 [INFO] [stdout] | [INFO] [stdout] 286 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `train_center` [INFO] [stdout] --> src/pq/pq.rs:303:12 [INFO] [stdout] | [INFO] [stdout] 303 | pub fn train_center(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_vec_range` [INFO] [stdout] --> src/pq/pq.rs:324:12 [INFO] [stdout] | [INFO] [stdout] 324 | pub fn get_distance_from_vec_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_knn_ADC` [INFO] [stdout] --> src/pq/pq.rs:334:12 [INFO] [stdout] | [INFO] [stdout] 334 | pub fn search_knn_ADC( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:366:5 [INFO] [stdout] | [INFO] [stdout] 366 | _K: i32, // max number of n_descendants to fit into leaf [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `_k` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:487:12 [INFO] [stdout] | [INFO] [stdout] 487 | pub fn get_K(&self) -> i32 { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `get_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:612:15 [INFO] [stdout] | [INFO] [stdout] 612 | const attempt: usize = 3; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper case: `ATTEMPT` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:616:13 [INFO] [stdout] | [INFO] [stdout] 616 | / self.distance [INFO] [stdout] 617 | | .create_split(children.as_slice(), &mut new_parent_leaf); [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Manhattan` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `manhattan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Dot` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Euclidean` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Unknown` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Map` that must be used [INFO] [stdout] --> src/core/node.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / vectors.iter().map(|x| { [INFO] [stdout] 67 | | if (Node::valid_elements(x)) { [INFO] [stdout] 68 | | // TODO: do somthing [INFO] [stdout] 69 | | } [INFO] [stdout] 70 | | }); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = note: iterators are lazy and do nothing unless consumed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/hnsw/hnsw.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | self.get_neighbors_by_heuristic2(top_candidates, n_neigh); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/hnsw/hnsw.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | self.get_neighbors_by_heuristic2(&mut candidates, n_neigh); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `EPS` should have a snake case name [INFO] [stdout] --> src/pq/pq.rs:193:21 [INFO] [stdout] | [INFO] [stdout] 193 | let EPS = 1.0 / 1024.0; [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `eps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/pq/pq.rs:221:17 [INFO] [stdout] | [INFO] [stdout] 221 | self.split_center(batch_size, &mut n_assigned_per_center); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/pq/pq.rs:227:17 [INFO] [stdout] | [INFO] [stdout] 227 | assert!(begin >= 0 && end - begin == self._demension); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `search_knn_ADC` should have a snake case name [INFO] [stdout] --> src/pq/pq.rs:334:12 [INFO] [stdout] | [INFO] [stdout] 334 | pub fn search_knn_ADC( [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_knn_adc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 157 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0170`. [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/hnsw/hnsw.rs:415:13 [INFO] [stdout] | [INFO] [stdout] 415 | let mut neigh0: Vec = Vec::new(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: private trait `Element` in public interface (error E0445) [INFO] [stdout] --> src/core/node.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | / pub trait FloatElement: Element + num::Float { [INFO] [stdout] 29 | | fn float_one() -> Self { [INFO] [stdout] 30 | | return Self::from_f32(1.0).unwrap(); [INFO] [stdout] 31 | | } [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(private_in_public)]` on by default [INFO] [stdout] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! [INFO] [stdout] = note: for more information, see issue #34537 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn new_with_vectors(_v: &[E]) -> Leaf { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `copy` [INFO] [stdout] --> src/annoy/annoy.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_literal` [INFO] [stdout] --> src/annoy/annoy.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn get_literal(&self) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/annoy/annoy.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:274:8 [INFO] [stdout] | [INFO] [stdout] 274 | fn normalize_distances(&self, distance: E) -> E { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:281:8 [INFO] [stdout] | [INFO] [stdout] 281 | fn pq_initial_value(&self) -> E { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:285:8 [INFO] [stdout] | [INFO] [stdout] 285 | fn name(&self) -> &'static str { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/annoy/annoy.rs:471:12 [INFO] [stdout] | [INFO] [stdout] 471 | pub fn new(f: usize, d: D) -> AnnoyIndex { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_f` [INFO] [stdout] --> src/annoy/annoy.rs:483:12 [INFO] [stdout] | [INFO] [stdout] 483 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_K` [INFO] [stdout] --> src/annoy/annoy.rs:487:12 [INFO] [stdout] | [INFO] [stdout] 487 | pub fn get_K(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `show_trees` [INFO] [stdout] --> src/annoy/annoy.rs:782:12 [INFO] [stdout] | [INFO] [stdout] 782 | pub fn show_trees(&self) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Dot` [INFO] [stdout] --> src/core/metrics.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | Dot, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `euclidean_distance_range` [INFO] [stdout] --> src/core/metrics.rs:78:8 [INFO] [stdout] | [INFO] [stdout] 78 | pub fn euclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `dimension` [INFO] [stdout] --> src/core/parameters.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | dimension: usize, // dimension [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `m` [INFO] [stdout] --> src/core/parameters.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | m: metrics::MetricType, // metric type [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/hnsw/hnsw.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | fn new() -> Data { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/hnsw/hnsw.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/hnsw/hnsw.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/hnsw/hnsw.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn new(demension: usize) -> HnswIndexer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_random_level` [INFO] [stdout] --> src/hnsw/hnsw.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | fn get_random_level(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_neighbors_by_heuristic2` [INFO] [stdout] --> src/hnsw/hnsw.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | fn get_neighbors_by_heuristic2( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | fn get_neighbor(&self, id: usize, level: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `clear_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | fn clear_neighbor(&mut self, id: usize, level: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `set_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | fn set_neighbor(&mut self, id: usize, level: usize, pos: usize, neighbor_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `push_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:158:8 [INFO] [stdout] | [INFO] [stdout] 158 | fn push_neighbor(&mut self, id: usize, level: usize, neighbor_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_level` [INFO] [stdout] --> src/hnsw/hnsw.rs:166:8 [INFO] [stdout] | [INFO] [stdout] 166 | fn get_level(&self, id: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `connect_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | fn connect_neighbor( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `delete_id` [INFO] [stdout] --> src/hnsw/hnsw.rs:272:12 [INFO] [stdout] | [INFO] [stdout] 272 | pub fn delete_id(&mut self, id: usize) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `is_deleted` [INFO] [stdout] --> src/hnsw/hnsw.rs:283:12 [INFO] [stdout] | [INFO] [stdout] 283 | pub fn is_deleted(&self, id: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_data` [INFO] [stdout] --> src/hnsw/hnsw.rs:287:12 [INFO] [stdout] | [INFO] [stdout] 287 | pub fn get_data(&self, id: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_vec` [INFO] [stdout] --> src/hnsw/hnsw.rs:291:12 [INFO] [stdout] | [INFO] [stdout] 291 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_id` [INFO] [stdout] --> src/hnsw/hnsw.rs:295:12 [INFO] [stdout] | [INFO] [stdout] 295 | pub fn get_distance_from_id(&self, x: usize, y: usize) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_laryer` [INFO] [stdout] --> src/hnsw/hnsw.rs:300:12 [INFO] [stdout] | [INFO] [stdout] 300 | pub fn search_laryer( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_laryer_default` [INFO] [stdout] --> src/hnsw/hnsw.rs:360:12 [INFO] [stdout] | [INFO] [stdout] 360 | pub fn search_laryer_default( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_knn` [INFO] [stdout] --> src/hnsw/hnsw.rs:369:12 [INFO] [stdout] | [INFO] [stdout] 369 | pub fn search_knn( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `init_item` [INFO] [stdout] --> src/hnsw/hnsw.rs:412:12 [INFO] [stdout] | [INFO] [stdout] 412 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `add_item` [INFO] [stdout] --> src/hnsw/hnsw.rs:430:12 [INFO] [stdout] | [INFO] [stdout] 430 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/pq/pq.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | fn new() -> Data { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/pq/pq.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/pq/pq.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/pq/pq.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn new(demension: usize, n_center: usize, _n_epoch: usize) -> KmeansIndexer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_vec` [INFO] [stdout] --> src/pq/pq.rs:57:12 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `init_center` [INFO] [stdout] --> src/pq/pq.rs:67:12 [INFO] [stdout] | [INFO] [stdout] 67 | pub fn init_center(&mut self, batch_size: usize, batch_data: &Vec>) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `update_center` [INFO] [stdout] --> src/pq/pq.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 103 | fn update_center( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_data` [INFO] [stdout] --> src/pq/pq.rs:145:8 [INFO] [stdout] | [INFO] [stdout] 145 | fn search_data( [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `split_center` [INFO] [stdout] --> src/pq/pq.rs:168:8 [INFO] [stdout] | [INFO] [stdout] 168 | fn split_center( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `train` [INFO] [stdout] --> src/pq/pq.rs:212:12 [INFO] [stdout] | [INFO] [stdout] 212 | pub fn train(&mut self, batch_size: usize, batch_data: &Vec>) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `set_range` [INFO] [stdout] --> src/pq/pq.rs:226:12 [INFO] [stdout] | [INFO] [stdout] 226 | pub fn set_range(&mut self, begin: usize, end: usize) { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/pq/pq.rs:255:12 [INFO] [stdout] | [INFO] [stdout] 255 | pub fn new(demension: usize, n_sub: usize, sub_bits: usize, train_epoch: usize) -> PQIndexer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `init_item` [INFO] [stdout] --> src/pq/pq.rs:278:12 [INFO] [stdout] | [INFO] [stdout] 278 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `add_item` [INFO] [stdout] --> src/pq/pq.rs:286:12 [INFO] [stdout] | [INFO] [stdout] 286 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `train_center` [INFO] [stdout] --> src/pq/pq.rs:303:12 [INFO] [stdout] | [INFO] [stdout] 303 | pub fn train_center(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_vec_range` [INFO] [stdout] --> src/pq/pq.rs:324:12 [INFO] [stdout] | [INFO] [stdout] 324 | pub fn get_distance_from_vec_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_knn_ADC` [INFO] [stdout] --> src/pq/pq.rs:334:12 [INFO] [stdout] | [INFO] [stdout] 334 | pub fn search_knn_ADC( [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:366:5 [INFO] [stdout] | [INFO] [stdout] 366 | _K: i32, // max number of n_descendants to fit into leaf [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `_k` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:487:12 [INFO] [stdout] | [INFO] [stdout] 487 | pub fn get_K(&self) -> i32 { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `get_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:612:15 [INFO] [stdout] | [INFO] [stdout] 612 | const attempt: usize = 3; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper case: `ATTEMPT` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:616:13 [INFO] [stdout] | [INFO] [stdout] 616 | / self.distance [INFO] [stdout] 617 | | .create_split(children.as_slice(), &mut new_parent_leaf); [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Manhattan` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `manhattan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Dot` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Euclidean` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Unknown` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Map` that must be used [INFO] [stdout] --> src/core/node.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / vectors.iter().map(|x| { [INFO] [stdout] 67 | | if (Node::valid_elements(x)) { [INFO] [stdout] 68 | | // TODO: do somthing [INFO] [stdout] 69 | | } [INFO] [stdout] 70 | | }); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = note: iterators are lazy and do nothing unless consumed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/hnsw/hnsw.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | self.get_neighbors_by_heuristic2(top_candidates, n_neigh); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/hnsw/hnsw.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | self.get_neighbors_by_heuristic2(&mut candidates, n_neigh); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `EPS` should have a snake case name [INFO] [stdout] --> src/pq/pq.rs:193:21 [INFO] [stdout] | [INFO] [stdout] 193 | let EPS = 1.0 / 1024.0; [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `eps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/pq/pq.rs:221:17 [INFO] [stdout] | [INFO] [stdout] 221 | self.split_center(batch_size, &mut n_assigned_per_center); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/pq/pq.rs:227:17 [INFO] [stdout] | [INFO] [stdout] 227 | assert!(begin >= 0 && end - begin == self._demension); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `search_knn_ADC` should have a snake case name [INFO] [stdout] --> src/pq/pq.rs:334:12 [INFO] [stdout] | [INFO] [stdout] 334 | pub fn search_knn_ADC( [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_knn_adc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 155 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0170`. [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> src/annoy/annoy.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp::Ordering; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/annoy/annoy.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy` [INFO] [stdout] --> src/bench/bench.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::annoy; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy::annoy::AnnoyIndexer` [INFO] [stdout] --> src/bench/bench.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::annoy::annoy::AnnoyIndexer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::hnsw` [INFO] [stdout] --> src/bench/bench.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::hnsw; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Alphanumeric`, `Uniform` [INFO] [stdout] --> src/bench/bench.rs:8:27 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Normal` [INFO] [stdout] --> src/bench/bench.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::seq::SliceRandom` [INFO] [stdout] --> src/bench/bench.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use rand::seq::SliceRandom; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/bench/bench.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/bench/bench.rs:138:20 [INFO] [stdout] | [INFO] [stdout] 138 | if (idx % 100000 == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::core::metrics::manhattan_distance` [INFO] [stdout] --> src/core/node.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::core::metrics::manhattan_distance; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/core/node.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/core/node.rs:67:16 [INFO] [stdout] | [INFO] [stdout] 67 | if (Node::valid_elements(x)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::core::node` [INFO] [stdout] --> src/core/parameters.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::core::node; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy::random` [INFO] [stdout] --> src/flat/flat.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::annoy::random; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Reverse` [INFO] [stdout] --> src/flat/flat.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::cmp::Reverse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/hnsw/hnsw.rs:75:15 [INFO] [stdout] | [INFO] [stdout] 75 | while (ret < self._max_level) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::Normal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:41:53 [INFO] [stdout] | [INFO] [stdout] 41 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:51:53 [INFO] [stdout] | [INFO] [stdout] 51 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Ordering` [INFO] [stdout] --> src/annoy/annoy.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use std::cmp::Ordering; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/annoy/annoy.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy` [INFO] [stdout] --> src/bench/bench.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::annoy; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy::annoy::AnnoyIndexer` [INFO] [stdout] --> src/bench/bench.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::annoy::annoy::AnnoyIndexer; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::hnsw` [INFO] [stdout] --> src/bench/bench.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::hnsw; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Alphanumeric`, `Uniform` [INFO] [stdout] --> src/bench/bench.rs:8:27 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Normal` [INFO] [stdout] --> src/bench/bench.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rand::seq::SliceRandom` [INFO] [stdout] --> src/bench/bench.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use rand::seq::SliceRandom; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/bench/bench.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 11 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/bench/bench.rs:138:20 [INFO] [stdout] | [INFO] [stdout] 138 | if (idx % 100000 == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::Display` [INFO] [stdout] --> src/core/node.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::fmt::Display; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/core/node.rs:67:16 [INFO] [stdout] | [INFO] [stdout] 67 | if (Node::valid_elements(x)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::core::node` [INFO] [stdout] --> src/core/parameters.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::core::node; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::annoy::random` [INFO] [stdout] --> src/flat/flat.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::annoy::random; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::Reverse` [INFO] [stdout] --> src/flat/flat.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::cmp::Reverse; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `while` condition [INFO] [stdout] --> src/hnsw/hnsw.rs:75:15 [INFO] [stdout] | [INFO] [stdout] 75 | while (ret < self._max_level) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::Normal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:9:41 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:41:53 [INFO] [stdout] | [INFO] [stdout] 41 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:51:53 [INFO] [stdout] | [INFO] [stdout] 51 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/bench/bench.rs:8:41 [INFO] [stdout] | [INFO] [stdout] 8 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Distribution` [INFO] [stdout] --> src/bench/bench.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Manhattan` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Manhattan` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bindings_with_variant_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Dot` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: to match on the variant, qualify the path: `MetricType::Dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Euclidean` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Unknown` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ unreachable pattern [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] ... [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:130:26 [INFO] [stdout] | [INFO] [stdout] 130 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | fn zero_value(&self, src: &mut Leaf) {} [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:152:25 [INFO] [stdout] | [INFO] [stdout] 152 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:158:20 [INFO] [stdout] | [INFO] [stdout] 158 | fn side(&self, src: &Leaf, dst: &[E]) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dst` [INFO] [stdout] --> src/annoy/annoy.rs:158:35 [INFO] [stdout] | [INFO] [stdout] 158 | fn side(&self, src: &Leaf, dst: &[E]) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:162:22 [INFO] [stdout] | [INFO] [stdout] 162 | fn margin(&self, src: &Leaf, dst: &[E]) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dst` [INFO] [stdout] --> src/annoy/annoy.rs:162:37 [INFO] [stdout] | [INFO] [stdout] 162 | fn margin(&self, src: &Leaf, dst: &[E]) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `distance` [INFO] [stdout] --> src/annoy/annoy.rs:166:27 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_distance` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `margin` [INFO] [stdout] --> src/annoy/annoy.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_margin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `child_nr` [INFO] [stdout] --> src/annoy/annoy.rs:166:55 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_child_nr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `filename` [INFO] [stdout] --> src/annoy/annoy.rs:318:20 [INFO] [stdout] | [INFO] [stdout] 318 | fn save(&self, filename: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_filename` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:324:28 [INFO] [stdout] | [INFO] [stdout] 324 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/annoy/annoy.rs:324:36 [INFO] [stdout] | [INFO] [stdout] 324 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/annoy/annoy.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | idx: i32, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/annoy.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | n: usize, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `search_k` [INFO] [stdout] --> src/annoy/annoy.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | search_k: i32, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/annoy/annoy.rs:337:9 [INFO] [stdout] | [INFO] [stdout] 337 | f: &[E], [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/annoy.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | n: usize, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `search_k` [INFO] [stdout] --> src/annoy/annoy.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | search_k: i32, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/annoy/annoy.rs:349:23 [INFO] [stdout] | [INFO] [stdout] 349 | fn verbose(&self, v: bool) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/annoy/annoy.rs:350:24 [INFO] [stdout] | [INFO] [stdout] 350 | fn get_item(&self, item: E) -> Result { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `q` [INFO] [stdout] --> src/annoy/annoy.rs:353:28 [INFO] [stdout] | [INFO] [stdout] 353 | fn set_seed(&mut self, q: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:224:17 [INFO] [stdout] | [INFO] [stdout] 224 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:257:17 [INFO] [stdout] | [INFO] [stdout] 257 | Err(e) => return, // do nothing [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:304:25 [INFO] [stdout] | [INFO] [stdout] 304 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/annoy/annoy.rs:380:28 [INFO] [stdout] | [INFO] [stdout] 380 | fn add_item(&mut self, item: i32, w: &[E], d: D) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:511:17 [INFO] [stdout] | [INFO] [stdout] 511 | for i in 0..diff { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:555:21 [INFO] [stdout] | [INFO] [stdout] 555 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:613:13 [INFO] [stdout] | [INFO] [stdout] 613 | for i in 0..attempt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:671:21 [INFO] [stdout] | [INFO] [stdout] 671 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:708:13 [INFO] [stdout] | [INFO] [stdout] 708 | let leaf: Leaf = Leaf::new(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/random.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn set_seed(n: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | for i in 0..clustering_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..dimension { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | for i in 0..node_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 0..test_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `base` [INFO] [stdout] --> src/bench/bench.rs:99:10 [INFO] [stdout] | [INFO] [stdout] 99 | let (base, ns, ts) = make_normal_distribution_clustering(5, 1000, 1, 2, 100.0); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_base` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | for i in 0..K { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Manhattan` [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Manhattan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Dot` [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_Dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Euclidean` [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Unknown` [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/flat/flat.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn new(p: parameters::Parameters) -> FlatIndex { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/flat/flat.rs:80:20 [INFO] [stdout] | [INFO] [stdout] 80 | fn load(&self, path: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/flat/flat.rs:84:20 [INFO] [stdout] | [INFO] [stdout] 84 | fn dump(&self, path: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/hnsw/hnsw.rs:256:25 [INFO] [stdout] | [INFO] [stdout] 256 | for k in 0..n_neigh { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/hnsw/hnsw.rs:417:13 [INFO] [stdout] | [INFO] [stdout] 417 | for i in 0..cur_level { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/annoy/annoy.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/hnsw/hnsw.rs:415:13 [INFO] [stdout] | [INFO] [stdout] 415 | let mut neigh0: Vec = Vec::new(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: private trait `Element` in public interface (error E0445) [INFO] [stdout] --> src/core/node.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | / pub trait FloatElement: Element + num::Float { [INFO] [stdout] 29 | | fn float_one() -> Self { [INFO] [stdout] 30 | | return Self::from_f32(1.0).unwrap(); [INFO] [stdout] 31 | | } [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(private_in_public)]` on by default [INFO] [stdout] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! [INFO] [stdout] = note: for more information, see issue #34537 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn new_with_vectors(_v: &[E]) -> Leaf { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `copy` [INFO] [stdout] --> src/annoy/annoy.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_literal` [INFO] [stdout] --> src/annoy/annoy.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn get_literal(&self) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/annoy/annoy.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:274:8 [INFO] [stdout] | [INFO] [stdout] 274 | fn normalize_distances(&self, distance: E) -> E { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:281:8 [INFO] [stdout] | [INFO] [stdout] 281 | fn pq_initial_value(&self) -> E { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:285:8 [INFO] [stdout] | [INFO] [stdout] 285 | fn name(&self) -> &'static str { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/annoy/annoy.rs:471:12 [INFO] [stdout] | [INFO] [stdout] 471 | pub fn new(f: usize, d: D) -> AnnoyIndex { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_f` [INFO] [stdout] --> src/annoy/annoy.rs:483:12 [INFO] [stdout] | [INFO] [stdout] 483 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_K` [INFO] [stdout] --> src/annoy/annoy.rs:487:12 [INFO] [stdout] | [INFO] [stdout] 487 | pub fn get_K(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `show_trees` [INFO] [stdout] --> src/annoy/annoy.rs:782:12 [INFO] [stdout] | [INFO] [stdout] 782 | pub fn show_trees(&self) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `make_normal_distribution_clustering` [INFO] [stdout] --> src/bench/bench.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn make_normal_distribution_clustering( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `run_demo` [INFO] [stdout] --> src/bench/bench.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn run_demo() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Dot` [INFO] [stdout] --> src/core/metrics.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | Dot, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `euclidean_distance_range` [INFO] [stdout] --> src/core/metrics.rs:78:8 [INFO] [stdout] | [INFO] [stdout] 78 | pub fn euclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/core/node.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn distance(&self, other: &Node, cal: F) -> Result [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `dimension` [INFO] [stdout] --> src/core/parameters.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | dimension: usize, // dimension [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `m` [INFO] [stdout] --> src/core/parameters.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | m: metrics::MetricType, // metric type [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/hnsw/hnsw.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | fn new() -> Data { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/hnsw/hnsw.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/hnsw/hnsw.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/hnsw/hnsw.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn new(demension: usize) -> HnswIndexer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_random_level` [INFO] [stdout] --> src/hnsw/hnsw.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | fn get_random_level(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_neighbors_by_heuristic2` [INFO] [stdout] --> src/hnsw/hnsw.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | fn get_neighbors_by_heuristic2( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | fn get_neighbor(&self, id: usize, level: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `clear_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | fn clear_neighbor(&mut self, id: usize, level: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `set_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | fn set_neighbor(&mut self, id: usize, level: usize, pos: usize, neighbor_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `push_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:158:8 [INFO] [stdout] | [INFO] [stdout] 158 | fn push_neighbor(&mut self, id: usize, level: usize, neighbor_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_level` [INFO] [stdout] --> src/hnsw/hnsw.rs:166:8 [INFO] [stdout] | [INFO] [stdout] 166 | fn get_level(&self, id: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `connect_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | fn connect_neighbor( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `delete_id` [INFO] [stdout] --> src/hnsw/hnsw.rs:272:12 [INFO] [stdout] | [INFO] [stdout] 272 | pub fn delete_id(&mut self, id: usize) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `is_deleted` [INFO] [stdout] --> src/hnsw/hnsw.rs:283:12 [INFO] [stdout] | [INFO] [stdout] 283 | pub fn is_deleted(&self, id: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_data` [INFO] [stdout] --> src/hnsw/hnsw.rs:287:12 [INFO] [stdout] | [INFO] [stdout] 287 | pub fn get_data(&self, id: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_vec` [INFO] [stdout] --> src/hnsw/hnsw.rs:291:12 [INFO] [stdout] | [INFO] [stdout] 291 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_id` [INFO] [stdout] --> src/hnsw/hnsw.rs:295:12 [INFO] [stdout] | [INFO] [stdout] 295 | pub fn get_distance_from_id(&self, x: usize, y: usize) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_laryer` [INFO] [stdout] --> src/hnsw/hnsw.rs:300:12 [INFO] [stdout] | [INFO] [stdout] 300 | pub fn search_laryer( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_laryer_default` [INFO] [stdout] --> src/hnsw/hnsw.rs:360:12 [INFO] [stdout] | [INFO] [stdout] 360 | pub fn search_laryer_default( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_knn` [INFO] [stdout] --> src/hnsw/hnsw.rs:369:12 [INFO] [stdout] | [INFO] [stdout] 369 | pub fn search_knn( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `init_item` [INFO] [stdout] --> src/hnsw/hnsw.rs:412:12 [INFO] [stdout] | [INFO] [stdout] 412 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `add_item` [INFO] [stdout] --> src/hnsw/hnsw.rs:430:12 [INFO] [stdout] | [INFO] [stdout] 430 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:366:5 [INFO] [stdout] | [INFO] [stdout] 366 | _K: i32, // max number of n_descendants to fit into leaf [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `_k` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:487:12 [INFO] [stdout] | [INFO] [stdout] 487 | pub fn get_K(&self) -> i32 { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `get_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:612:15 [INFO] [stdout] | [INFO] [stdout] 612 | const attempt: usize = 3; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper case: `ATTEMPT` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:616:13 [INFO] [stdout] | [INFO] [stdout] 616 | / self.distance [INFO] [stdout] 617 | | .create_split(children.as_slice(), &mut new_parent_leaf); [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Manhattan` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `manhattan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Dot` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Euclidean` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Unknown` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Map` that must be used [INFO] [stdout] --> src/core/node.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / vectors.iter().map(|x| { [INFO] [stdout] 67 | | if (Node::valid_elements(x)) { [INFO] [stdout] 68 | | // TODO: do somthing [INFO] [stdout] 69 | | } [INFO] [stdout] 70 | | }); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = note: iterators are lazy and do nothing unless consumed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/hnsw/hnsw.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | self.get_neighbors_by_heuristic2(top_candidates, n_neigh); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/hnsw/hnsw.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | self.get_neighbors_by_heuristic2(&mut candidates, n_neigh); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 131 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0170`. [INFO] [stdout] [INFO] [stdout] warning: unused import: `Distribution` [INFO] [stdout] --> src/bench/bench.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Manhattan` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Manhattan` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bindings_with_variant_name)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Dot` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: to match on the variant, qualify the path: `MetricType::Dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Euclidean` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0170]: pattern binding `Unknown` is named the same as one of the variants of the type `MetricType` [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: to match on the variant, qualify the path: `MetricType::Unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ unreachable pattern [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | --------- matches any value [INFO] [stdout] ... [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ unreachable pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:130:26 [INFO] [stdout] | [INFO] [stdout] 130 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:132:26 [INFO] [stdout] | [INFO] [stdout] 132 | fn zero_value(&self, src: &mut Leaf) {} [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:152:25 [INFO] [stdout] | [INFO] [stdout] 152 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:158:20 [INFO] [stdout] | [INFO] [stdout] 158 | fn side(&self, src: &Leaf, dst: &[E]) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dst` [INFO] [stdout] --> src/annoy/annoy.rs:158:35 [INFO] [stdout] | [INFO] [stdout] 158 | fn side(&self, src: &Leaf, dst: &[E]) -> bool { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:162:22 [INFO] [stdout] | [INFO] [stdout] 162 | fn margin(&self, src: &Leaf, dst: &[E]) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `dst` [INFO] [stdout] --> src/annoy/annoy.rs:162:37 [INFO] [stdout] | [INFO] [stdout] 162 | fn margin(&self, src: &Leaf, dst: &[E]) -> Result { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `distance` [INFO] [stdout] --> src/annoy/annoy.rs:166:27 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_distance` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `margin` [INFO] [stdout] --> src/annoy/annoy.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_margin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `child_nr` [INFO] [stdout] --> src/annoy/annoy.rs:166:55 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_child_nr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `filename` [INFO] [stdout] --> src/annoy/annoy.rs:318:20 [INFO] [stdout] | [INFO] [stdout] 318 | fn save(&self, filename: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_filename` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:324:28 [INFO] [stdout] | [INFO] [stdout] 324 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/annoy/annoy.rs:324:36 [INFO] [stdout] | [INFO] [stdout] 324 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/annoy/annoy.rs:329:9 [INFO] [stdout] | [INFO] [stdout] 329 | idx: i32, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/annoy.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | n: usize, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `search_k` [INFO] [stdout] --> src/annoy/annoy.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | search_k: i32, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/annoy/annoy.rs:337:9 [INFO] [stdout] | [INFO] [stdout] 337 | f: &[E], [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/annoy.rs:338:9 [INFO] [stdout] | [INFO] [stdout] 338 | n: usize, [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `search_k` [INFO] [stdout] --> src/annoy/annoy.rs:339:9 [INFO] [stdout] | [INFO] [stdout] 339 | search_k: i32, [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/annoy/annoy.rs:349:23 [INFO] [stdout] | [INFO] [stdout] 349 | fn verbose(&self, v: bool) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/annoy/annoy.rs:350:24 [INFO] [stdout] | [INFO] [stdout] 350 | fn get_item(&self, item: E) -> Result { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `q` [INFO] [stdout] --> src/annoy/annoy.rs:353:28 [INFO] [stdout] | [INFO] [stdout] 353 | fn set_seed(&mut self, q: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:224:17 [INFO] [stdout] | [INFO] [stdout] 224 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:257:17 [INFO] [stdout] | [INFO] [stdout] 257 | Err(e) => return, // do nothing [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:304:25 [INFO] [stdout] | [INFO] [stdout] 304 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/annoy/annoy.rs:380:28 [INFO] [stdout] | [INFO] [stdout] 380 | fn add_item(&mut self, item: i32, w: &[E], d: D) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:511:17 [INFO] [stdout] | [INFO] [stdout] 511 | for i in 0..diff { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:555:21 [INFO] [stdout] | [INFO] [stdout] 555 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/annoy/annoy.rs:613:13 [INFO] [stdout] | [INFO] [stdout] 613 | for i in 0..attempt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/annoy/annoy.rs:671:21 [INFO] [stdout] | [INFO] [stdout] 671 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaf` [INFO] [stdout] --> src/annoy/annoy.rs:708:13 [INFO] [stdout] | [INFO] [stdout] 708 | let leaf: Leaf = Leaf::new(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/annoy/random.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn set_seed(n: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | for i in 0..clustering_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | for i in 0..dimension { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | for i in 0..node_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | for i in 0..test_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `base` [INFO] [stdout] --> src/bench/bench.rs:99:10 [INFO] [stdout] | [INFO] [stdout] 99 | let (base, ns, ts) = make_normal_distribution_clustering(5, 1000, 1, 2, 100.0); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_base` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/bench/bench.rs:153:9 [INFO] [stdout] | [INFO] [stdout] 153 | for i in 0..K { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Manhattan` [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Manhattan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Dot` [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_Dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Euclidean` [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `Unknown` [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_Unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/flat/flat.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn new(p: parameters::Parameters) -> FlatIndex { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/flat/flat.rs:80:20 [INFO] [stdout] | [INFO] [stdout] 80 | fn load(&self, path: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/flat/flat.rs:84:20 [INFO] [stdout] | [INFO] [stdout] 84 | fn dump(&self, path: &str) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `k` [INFO] [stdout] --> src/hnsw/hnsw.rs:256:25 [INFO] [stdout] | [INFO] [stdout] 256 | for k in 0..n_neigh { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/hnsw/hnsw.rs:417:13 [INFO] [stdout] | [INFO] [stdout] 417 | for i in 0..cur_level { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/annoy/annoy.rs:166:40 [INFO] [stdout] | [INFO] [stdout] 166 | fn pq_distance(&self, distance: E, mut margin: E, child_nr: usize) -> E { [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/hnsw/hnsw.rs:415:13 [INFO] [stdout] | [INFO] [stdout] 415 | let mut neigh0: Vec = Vec::new(); [INFO] [stdout] | ----^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: private trait `Element` in public interface (error E0445) [INFO] [stdout] --> src/core/node.rs:28:1 [INFO] [stdout] | [INFO] [stdout] 28 | / pub trait FloatElement: Element + num::Float { [INFO] [stdout] 29 | | fn float_one() -> Self { [INFO] [stdout] 30 | | return Self::from_f32(1.0).unwrap(); [INFO] [stdout] 31 | | } [INFO] [stdout] ... | [INFO] [stdout] 35 | | } [INFO] [stdout] 36 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(private_in_public)]` on by default [INFO] [stdout] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! [INFO] [stdout] = note: for more information, see issue #34537 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:32:8 [INFO] [stdout] | [INFO] [stdout] 32 | fn new_with_vectors(_v: &[E]) -> Leaf { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `copy` [INFO] [stdout] --> src/annoy/annoy.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_literal` [INFO] [stdout] --> src/annoy/annoy.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 55 | pub fn get_literal(&self) -> String { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/annoy/annoy.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:274:8 [INFO] [stdout] | [INFO] [stdout] 274 | fn normalize_distances(&self, distance: E) -> E { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:281:8 [INFO] [stdout] | [INFO] [stdout] 281 | fn pq_initial_value(&self) -> E { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:285:8 [INFO] [stdout] | [INFO] [stdout] 285 | fn name(&self) -> &'static str { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/annoy/annoy.rs:471:12 [INFO] [stdout] | [INFO] [stdout] 471 | pub fn new(f: usize, d: D) -> AnnoyIndex { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_f` [INFO] [stdout] --> src/annoy/annoy.rs:483:12 [INFO] [stdout] | [INFO] [stdout] 483 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_K` [INFO] [stdout] --> src/annoy/annoy.rs:487:12 [INFO] [stdout] | [INFO] [stdout] 487 | pub fn get_K(&self) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `show_trees` [INFO] [stdout] --> src/annoy/annoy.rs:782:12 [INFO] [stdout] | [INFO] [stdout] 782 | pub fn show_trees(&self) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `make_normal_distribution_clustering` [INFO] [stdout] --> src/bench/bench.rs:17:4 [INFO] [stdout] | [INFO] [stdout] 17 | fn make_normal_distribution_clustering( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `run_demo` [INFO] [stdout] --> src/bench/bench.rs:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | pub fn run_demo() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant is never constructed: `Dot` [INFO] [stdout] --> src/core/metrics.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | Dot, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `euclidean_distance_range` [INFO] [stdout] --> src/core/metrics.rs:78:8 [INFO] [stdout] | [INFO] [stdout] 78 | pub fn euclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `dimension` [INFO] [stdout] --> src/core/parameters.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | dimension: usize, // dimension [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `m` [INFO] [stdout] --> src/core/parameters.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | m: metrics::MetricType, // metric type [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/hnsw/hnsw.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | fn new() -> Data { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/hnsw/hnsw.rs:22:8 [INFO] [stdout] | [INFO] [stdout] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/hnsw/hnsw.rs:29:8 [INFO] [stdout] | [INFO] [stdout] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/hnsw/hnsw.rs:56:12 [INFO] [stdout] | [INFO] [stdout] 56 | pub fn new(demension: usize) -> HnswIndexer { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_random_level` [INFO] [stdout] --> src/hnsw/hnsw.rs:72:8 [INFO] [stdout] | [INFO] [stdout] 72 | fn get_random_level(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_neighbors_by_heuristic2` [INFO] [stdout] --> src/hnsw/hnsw.rs:89:8 [INFO] [stdout] | [INFO] [stdout] 89 | fn get_neighbors_by_heuristic2( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | fn get_neighbor(&self, id: usize, level: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `clear_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:142:8 [INFO] [stdout] | [INFO] [stdout] 142 | fn clear_neighbor(&mut self, id: usize, level: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `set_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:150:8 [INFO] [stdout] | [INFO] [stdout] 150 | fn set_neighbor(&mut self, id: usize, level: usize, pos: usize, neighbor_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `push_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:158:8 [INFO] [stdout] | [INFO] [stdout] 158 | fn push_neighbor(&mut self, id: usize, level: usize, neighbor_id: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_level` [INFO] [stdout] --> src/hnsw/hnsw.rs:166:8 [INFO] [stdout] | [INFO] [stdout] 166 | fn get_level(&self, id: usize) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `connect_neighbor` [INFO] [stdout] --> src/hnsw/hnsw.rs:170:8 [INFO] [stdout] | [INFO] [stdout] 170 | fn connect_neighbor( [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `delete_id` [INFO] [stdout] --> src/hnsw/hnsw.rs:272:12 [INFO] [stdout] | [INFO] [stdout] 272 | pub fn delete_id(&mut self, id: usize) -> Result<(), &'static str> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `is_deleted` [INFO] [stdout] --> src/hnsw/hnsw.rs:283:12 [INFO] [stdout] | [INFO] [stdout] 283 | pub fn is_deleted(&self, id: usize) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_data` [INFO] [stdout] --> src/hnsw/hnsw.rs:287:12 [INFO] [stdout] | [INFO] [stdout] 287 | pub fn get_data(&self, id: usize) -> &Vec { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_vec` [INFO] [stdout] --> src/hnsw/hnsw.rs:291:12 [INFO] [stdout] | [INFO] [stdout] 291 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `get_distance_from_id` [INFO] [stdout] --> src/hnsw/hnsw.rs:295:12 [INFO] [stdout] | [INFO] [stdout] 295 | pub fn get_distance_from_id(&self, x: usize, y: usize) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_laryer` [INFO] [stdout] --> src/hnsw/hnsw.rs:300:12 [INFO] [stdout] | [INFO] [stdout] 300 | pub fn search_laryer( [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_laryer_default` [INFO] [stdout] --> src/hnsw/hnsw.rs:360:12 [INFO] [stdout] | [INFO] [stdout] 360 | pub fn search_laryer_default( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `search_knn` [INFO] [stdout] --> src/hnsw/hnsw.rs:369:12 [INFO] [stdout] | [INFO] [stdout] 369 | pub fn search_knn( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `init_item` [INFO] [stdout] --> src/hnsw/hnsw.rs:412:12 [INFO] [stdout] | [INFO] [stdout] 412 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `add_item` [INFO] [stdout] --> src/hnsw/hnsw.rs:430:12 [INFO] [stdout] | [INFO] [stdout] 430 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: structure field `_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:366:5 [INFO] [stdout] | [INFO] [stdout] 366 | _K: i32, // max number of n_descendants to fit into leaf [INFO] [stdout] | ^^ help: convert the identifier to snake case (notice the capitalization): `_k` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `get_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:487:12 [INFO] [stdout] | [INFO] [stdout] 487 | pub fn get_K(&self) -> i32 { [INFO] [stdout] | ^^^^^ help: convert the identifier to snake case (notice the capitalization): `get_k` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:612:15 [INFO] [stdout] | [INFO] [stdout] 612 | const attempt: usize = 3; [INFO] [stdout] | ^^^^^^^ help: convert the identifier to upper case: `ATTEMPT` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:616:13 [INFO] [stdout] | [INFO] [stdout] 616 | / self.distance [INFO] [stdout] 617 | | .create_split(children.as_slice(), &mut new_parent_leaf); [INFO] [stdout] | |_________________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Manhattan` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | Manhattan => manhattan_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `manhattan` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Dot` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | Dot => dot(vec1, vec2), [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `dot` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Euclidean` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | Euclidean => euclidean_distance(vec1, vec2), [INFO] [stdout] | ^^^^^^^^^ help: convert the identifier to snake case: `euclidean` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Unknown` should have a snake case name [INFO] [stdout] --> src/core/metrics.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | Unknown => Result::Err("unknown method"), [INFO] [stdout] | ^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `unknown` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Map` that must be used [INFO] [stdout] --> src/core/node.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | / vectors.iter().map(|x| { [INFO] [stdout] 67 | | if (Node::valid_elements(x)) { [INFO] [stdout] 68 | | // TODO: do somthing [INFO] [stdout] 69 | | } [INFO] [stdout] 70 | | }); [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = note: iterators are lazy and do nothing unless consumed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/hnsw/hnsw.rs:182:9 [INFO] [stdout] | [INFO] [stdout] 182 | self.get_neighbors_by_heuristic2(top_candidates, n_neigh); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/hnsw/hnsw.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | self.get_neighbors_by_heuristic2(&mut candidates, n_neigh); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 129 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0170`. [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 12.98s [INFO] running `Command { std: "docker" "inspect" "9698568e0471e41a98a788bf87d05e60229990fd627238bccfb7da383b6899b5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9698568e0471e41a98a788bf87d05e60229990fd627238bccfb7da383b6899b5", kill_on_drop: false }` [INFO] [stdout] 9698568e0471e41a98a788bf87d05e60229990fd627238bccfb7da383b6899b5