[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] eadc1886bd5d170b3654312a5a046c92b2cf0c0b [INFO] testing fastann/fastann against try#eafdee2dfae8c2233b74f98b123308be7ccefcc6 for pr-79296 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffastann%2Ffastann" "/workspace/builds/worker-1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/fastann/fastann on toolchain eafdee2dfae8c2233b74f98b123308be7ccefcc6 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+eafdee2dfae8c2233b74f98b123308be7ccefcc6" "read-manifest" "--manifest-path" "Cargo.toml", 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-1/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" "+eafdee2dfae8c2233b74f98b123308be7ccefcc6" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/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:6eabd152ff4036248d66efda456a36cb33d24b7291b33f25f75140726c88da35" "/opt/rustwide/cargo-home/bin/cargo" "+eafdee2dfae8c2233b74f98b123308be7ccefcc6" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 77d62fcd335fce1fa84817d5ef176b67f20561e4c6e7f50b8c896074d0355322 [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" "77d62fcd335fce1fa84817d5ef176b67f20561e4c6e7f50b8c896074d0355322", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "77d62fcd335fce1fa84817d5ef176b67f20561e4c6e7f50b8c896074d0355322", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "77d62fcd335fce1fa84817d5ef176b67f20561e4c6e7f50b8c896074d0355322", kill_on_drop: false }` [INFO] [stdout] 77d62fcd335fce1fa84817d5ef176b67f20561e4c6e7f50b8c896074d0355322 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/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:6eabd152ff4036248d66efda456a36cb33d24b7291b33f25f75140726c88da35" "/opt/rustwide/cargo-home/bin/cargo" "+eafdee2dfae8c2233b74f98b123308be7ccefcc6" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] c8b40c46f51d8b02de917712ee43cca2a6f2bea47573a2ed91f786d6a7435e0c [INFO] running `Command { std: "docker" "start" "-a" "c8b40c46f51d8b02de917712ee43cca2a6f2bea47573a2ed91f786d6a7435e0c", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling libc v0.2.79 [INFO] [stderr] Compiling getrandom v0.1.15 [INFO] [stderr] Compiling cfg-if v0.1.10 [INFO] [stderr] Compiling ppv-lite86 v0.2.9 [INFO] [stderr] Compiling num-traits v0.2.12 [INFO] [stderr] Compiling num-integer v0.1.43 [INFO] [stderr] Compiling num-iter v0.1.41 [INFO] [stderr] Compiling rand v0.4.6 [INFO] [stderr] Compiling rand_core v0.5.1 [INFO] [stderr] Compiling rand_chacha v0.2.2 [INFO] [stderr] Compiling rand v0.7.3 [INFO] [stderr] Compiling num-complex v0.1.43 [INFO] [stderr] Compiling num-bigint v0.1.44 [INFO] [stderr] Compiling num-rational v0.1.42 [INFO] [stderr] Compiling num v0.1.42 [INFO] [stderr] Compiling fastann v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/annoy/annoy.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::common::calc::manhanttan_distance` [INFO] [stdout] --> src/common/node.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::common::calc::manhanttan_distance; [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] = note: `#[warn(unused_parens)]` on by default [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: unused variable: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:144:26 [INFO] [stdout] | [INFO] [stdout] 144 | 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:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | 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:166:25 [INFO] [stdout] | [INFO] [stdout] 166 | 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:172:20 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:172:32 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:176:22 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:176:34 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:180:27 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:59 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:315:20 [INFO] [stdout] | [INFO] [stdout] 315 | 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:321:28 [INFO] [stdout] | [INFO] [stdout] 321 | 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:321:36 [INFO] [stdout] | [INFO] [stdout] 321 | 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:326:9 [INFO] [stdout] | [INFO] [stdout] 326 | 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:327:9 [INFO] [stdout] | [INFO] [stdout] 327 | 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:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | 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:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | f: &[f64], [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:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | 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:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | 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:346:23 [INFO] [stdout] | [INFO] [stdout] 346 | 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:347:24 [INFO] [stdout] | [INFO] [stdout] 347 | fn get_item(&self, item: f64) -> 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:350:28 [INFO] [stdout] | [INFO] [stdout] 350 | 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:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | 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:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | 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:377:28 [INFO] [stdout] | [INFO] [stdout] 377 | fn add_item(&mut self, item: i32, w: &[f64], 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:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | 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:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | Err(e) => continue, [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:608:13 [INFO] [stdout] | [INFO] [stdout] 608 | 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:659:21 [INFO] [stdout] | [INFO] [stdout] 659 | Err(e) => continue, [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:696:13 [INFO] [stdout] | [INFO] [stdout] 696 | let 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: `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:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | 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:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | 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:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | 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:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | 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:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | 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:301:13 [INFO] [stdout] | [INFO] [stdout] 301 | 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:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | fn new_with_vectors(_v: &[f64]) -> 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:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:271:8 [INFO] [stdout] | [INFO] [stdout] 271 | fn normalize_distances(&self, distance: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:278:8 [INFO] [stdout] | [INFO] [stdout] 278 | fn pq_initial_value(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:282:8 [INFO] [stdout] | [INFO] [stdout] 282 | 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:472:12 [INFO] [stdout] | [INFO] [stdout] 472 | 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:484:12 [INFO] [stdout] | [INFO] [stdout] 484 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `V_ARRAY_SIZE` [INFO] [stdout] --> src/annoy/def.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub const V_ARRAY_SIZE: usize = 65536; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `manhanttan_distance` [INFO] [stdout] --> src/common/calc.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn manhanttan_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance` [INFO] [stdout] --> src/common/calc.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn enclidean_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance_range` [INFO] [stdout] --> src/common/calc.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn enclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/common/neighbor.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn new(idx: usize, distance: f64) -> Neighbor { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/common/node.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn new(vectors: &[E]) -> Node { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/common/node.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn distance(&self, other: &Node, cal: F) -> Result [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:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | 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:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | 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:140:8 [INFO] [stdout] | [INFO] [stdout] 140 | 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:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | fn split_center( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `train` [INFO] [stdout] --> src/pq/pq.rs:207:12 [INFO] [stdout] | [INFO] [stdout] 207 | 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:221:12 [INFO] [stdout] | [INFO] [stdout] 221 | 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:250:12 [INFO] [stdout] | [INFO] [stdout] 250 | 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:273:12 [INFO] [stdout] | [INFO] [stdout] 273 | 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:281:12 [INFO] [stdout] | [INFO] [stdout] 281 | 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:298:12 [INFO] [stdout] | [INFO] [stdout] 298 | 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:319:12 [INFO] [stdout] | [INFO] [stdout] 319 | 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:329:12 [INFO] [stdout] | [INFO] [stdout] 329 | 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:363:5 [INFO] [stdout] | [INFO] [stdout] 363 | _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: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:607:15 [INFO] [stdout] | [INFO] [stdout] 607 | 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 `std::result::Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:611:13 [INFO] [stdout] | [INFO] [stdout] 611 | self.distance.create_split(children.as_slice(), &mut m); [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: unused `std::result::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 `std::result::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:188:21 [INFO] [stdout] | [INFO] [stdout] 188 | let EPS = 1.0 / 1024.0; [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `eps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/pq/pq.rs:216:17 [INFO] [stdout] | [INFO] [stdout] 216 | 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:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | 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:329:12 [INFO] [stdout] | [INFO] [stdout] 329 | pub fn search_knn_ADC( [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_knn_adc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 108 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/annoy/annoy.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::common::calc::manhanttan_distance` [INFO] [stdout] --> src/common/node.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::common::calc::manhanttan_distance; [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] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Alphanumeric`, `Uniform` [INFO] [stdout] --> src/main.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Normal` [INFO] [stdout] --> src/main.rs:6:41 [INFO] [stdout] | [INFO] [stdout] 6 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/main.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/main.rs:5:41 [INFO] [stdout] | [INFO] [stdout] 5 | 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/main.rs:6:41 [INFO] [stdout] | [INFO] [stdout] 6 | 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/main.rs:81:53 [INFO] [stdout] | [INFO] [stdout] 81 | 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/main.rs:5:41 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Distribution` [INFO] [stdout] --> src/main.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | for i in 0..clustering_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | 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: `v` [INFO] [stdout] --> src/main.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | let mut v: Vec = Vec::new(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | 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: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:144:26 [INFO] [stdout] | [INFO] [stdout] 144 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | 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:166:25 [INFO] [stdout] | [INFO] [stdout] 166 | 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:172:20 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:172:32 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:176:22 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:176:34 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:180:27 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:59 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:315:20 [INFO] [stdout] | [INFO] [stdout] 315 | 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:321:28 [INFO] [stdout] | [INFO] [stdout] 321 | 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:321:36 [INFO] [stdout] | [INFO] [stdout] 321 | 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:326:9 [INFO] [stdout] | [INFO] [stdout] 326 | 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:327:9 [INFO] [stdout] | [INFO] [stdout] 327 | 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:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | 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:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | f: &[f64], [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:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | 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:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | 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:346:23 [INFO] [stdout] | [INFO] [stdout] 346 | 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:347:24 [INFO] [stdout] | [INFO] [stdout] 347 | fn get_item(&self, item: f64) -> 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:350:28 [INFO] [stdout] | [INFO] [stdout] 350 | 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:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | 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:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | 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:377:28 [INFO] [stdout] | [INFO] [stdout] 377 | fn add_item(&mut self, item: i32, w: &[f64], 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:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | 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:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | Err(e) => continue, [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:608:13 [INFO] [stdout] | [INFO] [stdout] 608 | 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:659:21 [INFO] [stdout] | [INFO] [stdout] 659 | Err(e) => continue, [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:696:13 [INFO] [stdout] | [INFO] [stdout] 696 | let 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: `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/main.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | let mut v: Vec = Vec::new(); [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/annoy/annoy.rs:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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/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: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | fn new_with_vectors(_v: &[f64]) -> 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:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:271:8 [INFO] [stdout] | [INFO] [stdout] 271 | fn normalize_distances(&self, distance: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:278:8 [INFO] [stdout] | [INFO] [stdout] 278 | fn pq_initial_value(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:282:8 [INFO] [stdout] | [INFO] [stdout] 282 | 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:472:12 [INFO] [stdout] | [INFO] [stdout] 472 | 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:484:12 [INFO] [stdout] | [INFO] [stdout] 484 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `V_ARRAY_SIZE` [INFO] [stdout] --> src/annoy/def.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub const V_ARRAY_SIZE: usize = 65536; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `manhanttan_distance` [INFO] [stdout] --> src/common/calc.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn manhanttan_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance` [INFO] [stdout] --> src/common/calc.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn enclidean_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance_range` [INFO] [stdout] --> src/common/calc.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn enclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/common/neighbor.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn new(idx: usize, distance: f64) -> Neighbor { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/common/node.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn new(vectors: &[E]) -> Node { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/common/node.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn distance(&self, other: &Node, cal: F) -> Result [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: function is never used: `test_annoy` [INFO] [stdout] --> src/main.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn test_annoy() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_hnsw` [INFO] [stdout] --> src/main.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn test_hnsw() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | aix.add_item(i as i32, &f, angular); [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: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | indexer.add_item(i, &f); [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: structure field `_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:363:5 [INFO] [stdout] | [INFO] [stdout] 363 | _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: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:607:15 [INFO] [stdout] | [INFO] [stdout] 607 | 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 `std::result::Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:611:13 [INFO] [stdout] | [INFO] [stdout] 611 | self.distance.create_split(children.as_slice(), &mut m); [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 `std::result::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 `std::result::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: 97 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 19.01s [INFO] running `Command { std: "docker" "inspect" "c8b40c46f51d8b02de917712ee43cca2a6f2bea47573a2ed91f786d6a7435e0c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c8b40c46f51d8b02de917712ee43cca2a6f2bea47573a2ed91f786d6a7435e0c", kill_on_drop: false }` [INFO] [stdout] c8b40c46f51d8b02de917712ee43cca2a6f2bea47573a2ed91f786d6a7435e0c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/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:6eabd152ff4036248d66efda456a36cb33d24b7291b33f25f75140726c88da35" "/opt/rustwide/cargo-home/bin/cargo" "+eafdee2dfae8c2233b74f98b123308be7ccefcc6" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] b84a9702e03ae97fd4f9a28599821cf5e62c807742d30ecbde460682c96537c3 [INFO] running `Command { std: "docker" "start" "-a" "b84a9702e03ae97fd4f9a28599821cf5e62c807742d30ecbde460682c96537c3", kill_on_drop: false }` [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/annoy/annoy.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::common::calc::manhanttan_distance` [INFO] [stdout] --> src/common/node.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::common::calc::manhanttan_distance; [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] = note: `#[warn(unused_parens)]` on by default [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: unused variable: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:144:26 [INFO] [stdout] | [INFO] [stdout] 144 | 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:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | 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:166:25 [INFO] [stdout] | [INFO] [stdout] 166 | 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:172:20 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:172:32 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:176:22 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:176:34 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:180:27 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:59 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:315:20 [INFO] [stdout] | [INFO] [stdout] 315 | 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:321:28 [INFO] [stdout] | [INFO] [stdout] 321 | 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:321:36 [INFO] [stdout] | [INFO] [stdout] 321 | 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:326:9 [INFO] [stdout] | [INFO] [stdout] 326 | 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:327:9 [INFO] [stdout] | [INFO] [stdout] 327 | 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:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | 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:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | f: &[f64], [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:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | 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:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | 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:346:23 [INFO] [stdout] | [INFO] [stdout] 346 | 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:347:24 [INFO] [stdout] | [INFO] [stdout] 347 | fn get_item(&self, item: f64) -> 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:350:28 [INFO] [stdout] | [INFO] [stdout] 350 | 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:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | 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:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | 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:377:28 [INFO] [stdout] | [INFO] [stdout] 377 | fn add_item(&mut self, item: i32, w: &[f64], 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:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | 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:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | Err(e) => continue, [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:608:13 [INFO] [stdout] | [INFO] [stdout] 608 | 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:659:21 [INFO] [stdout] | [INFO] [stdout] 659 | Err(e) => continue, [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:696:13 [INFO] [stdout] | [INFO] [stdout] 696 | let 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: `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:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | 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:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | 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:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | 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:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | 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:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | 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:301:13 [INFO] [stdout] | [INFO] [stdout] 301 | 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:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | fn new_with_vectors(_v: &[f64]) -> 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:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:271:8 [INFO] [stdout] | [INFO] [stdout] 271 | fn normalize_distances(&self, distance: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:278:8 [INFO] [stdout] | [INFO] [stdout] 278 | fn pq_initial_value(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:282:8 [INFO] [stdout] | [INFO] [stdout] 282 | 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:472:12 [INFO] [stdout] | [INFO] [stdout] 472 | 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:484:12 [INFO] [stdout] | [INFO] [stdout] 484 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `V_ARRAY_SIZE` [INFO] [stdout] --> src/annoy/def.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub const V_ARRAY_SIZE: usize = 65536; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `manhanttan_distance` [INFO] [stdout] --> src/common/calc.rs:19:8 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn manhanttan_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance` [INFO] [stdout] --> src/common/calc.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn enclidean_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance_range` [INFO] [stdout] --> src/common/calc.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn enclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/common/neighbor.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn new(idx: usize, distance: f64) -> Neighbor { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/common/node.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn new(vectors: &[E]) -> Node { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance` [INFO] [stdout] --> src/common/node.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn distance(&self, other: &Node, cal: F) -> Result [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] [stderr] Compiling fastann v0.1.0 (/opt/rustwide/workdir) [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:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | 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:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | 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:140:8 [INFO] [stdout] | [INFO] [stdout] 140 | 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:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | fn split_center( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `train` [INFO] [stdout] --> src/pq/pq.rs:207:12 [INFO] [stdout] | [INFO] [stdout] 207 | 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:221:12 [INFO] [stdout] | [INFO] [stdout] 221 | 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:250:12 [INFO] [stdout] | [INFO] [stdout] 250 | 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:273:12 [INFO] [stdout] | [INFO] [stdout] 273 | 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:281:12 [INFO] [stdout] | [INFO] [stdout] 281 | 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:298:12 [INFO] [stdout] | [INFO] [stdout] 298 | 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:319:12 [INFO] [stdout] | [INFO] [stdout] 319 | 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:329:12 [INFO] [stdout] | [INFO] [stdout] 329 | 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:363:5 [INFO] [stdout] | [INFO] [stdout] 363 | _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: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:607:15 [INFO] [stdout] | [INFO] [stdout] 607 | 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 `std::result::Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:611:13 [INFO] [stdout] | [INFO] [stdout] 611 | self.distance.create_split(children.as_slice(), &mut m); [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: unused `std::result::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 `std::result::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:188:21 [INFO] [stdout] | [INFO] [stdout] 188 | let EPS = 1.0 / 1024.0; [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `eps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/pq/pq.rs:216:17 [INFO] [stdout] | [INFO] [stdout] 216 | 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:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | 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:329:12 [INFO] [stdout] | [INFO] [stdout] 329 | pub fn search_knn_ADC( [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_knn_adc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 108 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/annoy/annoy.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::HashMap; [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:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [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] = note: `#[warn(unused_parens)]` on by default [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: 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] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Alphanumeric`, `Uniform` [INFO] [stdout] --> src/main.rs:5:27 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Normal` [INFO] [stdout] --> src/main.rs:6:41 [INFO] [stdout] | [INFO] [stdout] 6 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `thread_rng` [INFO] [stdout] --> src/main.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | use rand::{thread_rng, Rng}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stdout] --> src/main.rs:5:41 [INFO] [stdout] | [INFO] [stdout] 5 | 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/main.rs:6:41 [INFO] [stdout] | [INFO] [stdout] 6 | 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/main.rs:81:53 [INFO] [stdout] | [INFO] [stdout] 81 | 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/main.rs:5:41 [INFO] [stdout] | [INFO] [stdout] 5 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:144:26 [INFO] [stdout] | [INFO] [stdout] 144 | 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:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | 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:166:25 [INFO] [stdout] | [INFO] [stdout] 166 | 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:172:20 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:172:32 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:176:22 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:176:34 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:180:27 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:59 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:315:20 [INFO] [stdout] | [INFO] [stdout] 315 | 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:321:28 [INFO] [stdout] | [INFO] [stdout] 321 | 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:321:36 [INFO] [stdout] | [INFO] [stdout] 321 | 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:326:9 [INFO] [stdout] | [INFO] [stdout] 326 | 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:327:9 [INFO] [stdout] | [INFO] [stdout] 327 | 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:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | 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:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | f: &[f64], [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:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | 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:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | 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:346:23 [INFO] [stdout] | [INFO] [stdout] 346 | 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:347:24 [INFO] [stdout] | [INFO] [stdout] 347 | fn get_item(&self, item: f64) -> 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:350:28 [INFO] [stdout] | [INFO] [stdout] 350 | 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:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | 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:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | 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:377:28 [INFO] [stdout] | [INFO] [stdout] 377 | fn add_item(&mut self, item: i32, w: &[f64], 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:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | 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:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | Err(e) => continue, [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:608:13 [INFO] [stdout] | [INFO] [stdout] 608 | 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:659:21 [INFO] [stdout] | [INFO] [stdout] 659 | Err(e) => continue, [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:696:13 [INFO] [stdout] | [INFO] [stdout] 696 | let 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: `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:67:13 [INFO] [stdout] | [INFO] [stdout] 67 | 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:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | 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:110:17 [INFO] [stdout] | [INFO] [stdout] 110 | 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:116:13 [INFO] [stdout] | [INFO] [stdout] 116 | 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:147:13 [INFO] [stdout] | [INFO] [stdout] 147 | 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:301:13 [INFO] [stdout] | [INFO] [stdout] 301 | 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:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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: unused import: `Distribution` [INFO] [stdout] --> src/main.rs:6:27 [INFO] [stdout] | [INFO] [stdout] 6 | use rand::distributions::{Distribution, Normal}; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:72:9 [INFO] [stdout] | [INFO] [stdout] 72 | for i in 0..clustering_n { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | 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: `v` [INFO] [stdout] --> src/main.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | let mut v: Vec = Vec::new(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | 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: `leaves` [INFO] [stdout] --> src/annoy/annoy.rs:144:26 [INFO] [stdout] | [INFO] [stdout] 144 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `src` [INFO] [stdout] --> src/annoy/annoy.rs:146:26 [INFO] [stdout] | [INFO] [stdout] 146 | 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:166:25 [INFO] [stdout] | [INFO] [stdout] 166 | 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:172:20 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:172:32 [INFO] [stdout] | [INFO] [stdout] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> 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:176:22 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:176:34 [INFO] [stdout] | [INFO] [stdout] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> 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:180:27 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:180:59 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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:315:20 [INFO] [stdout] | [INFO] [stdout] 315 | 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:321:28 [INFO] [stdout] | [INFO] [stdout] 321 | 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:321:36 [INFO] [stdout] | [INFO] [stdout] 321 | 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:326:9 [INFO] [stdout] | [INFO] [stdout] 326 | 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:327:9 [INFO] [stdout] | [INFO] [stdout] 327 | 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:328:9 [INFO] [stdout] | [INFO] [stdout] 328 | 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:334:9 [INFO] [stdout] | [INFO] [stdout] 334 | f: &[f64], [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:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | 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:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | 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:346:23 [INFO] [stdout] | [INFO] [stdout] 346 | 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:347:24 [INFO] [stdout] | [INFO] [stdout] 347 | fn get_item(&self, item: f64) -> 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:350:28 [INFO] [stdout] | [INFO] [stdout] 350 | 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:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | 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:301:25 [INFO] [stdout] | [INFO] [stdout] 301 | 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:377:28 [INFO] [stdout] | [INFO] [stdout] 377 | fn add_item(&mut self, item: i32, w: &[f64], 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:508:17 [INFO] [stdout] | [INFO] [stdout] 508 | 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:552:21 [INFO] [stdout] | [INFO] [stdout] 552 | Err(e) => continue, [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:608:13 [INFO] [stdout] | [INFO] [stdout] 608 | 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:659:21 [INFO] [stdout] | [INFO] [stdout] 659 | Err(e) => continue, [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:696:13 [INFO] [stdout] | [INFO] [stdout] 696 | let 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: `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: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | fn new_with_vectors(_v: &[f64]) -> 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:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:271:8 [INFO] [stdout] | [INFO] [stdout] 271 | fn normalize_distances(&self, distance: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:278:8 [INFO] [stdout] | [INFO] [stdout] 278 | fn pq_initial_value(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:282:8 [INFO] [stdout] | [INFO] [stdout] 282 | 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:472:12 [INFO] [stdout] | [INFO] [stdout] 472 | 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:484:12 [INFO] [stdout] | [INFO] [stdout] 484 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `V_ARRAY_SIZE` [INFO] [stdout] --> src/annoy/def.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub const V_ARRAY_SIZE: usize = 65536; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance` [INFO] [stdout] --> src/common/calc.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn enclidean_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance_range` [INFO] [stdout] --> src/common/calc.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn enclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/common/neighbor.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn new(idx: usize, distance: f64) -> Neighbor { [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:62:12 [INFO] [stdout] | [INFO] [stdout] 62 | 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:98:8 [INFO] [stdout] | [INFO] [stdout] 98 | 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:140:8 [INFO] [stdout] | [INFO] [stdout] 140 | 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:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | fn split_center( [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `train` [INFO] [stdout] --> src/pq/pq.rs:207:12 [INFO] [stdout] | [INFO] [stdout] 207 | 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:221:12 [INFO] [stdout] | [INFO] [stdout] 221 | 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:250:12 [INFO] [stdout] | [INFO] [stdout] 250 | 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:273:12 [INFO] [stdout] | [INFO] [stdout] 273 | 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:281:12 [INFO] [stdout] | [INFO] [stdout] 281 | 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:298:12 [INFO] [stdout] | [INFO] [stdout] 298 | 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:319:12 [INFO] [stdout] | [INFO] [stdout] 319 | 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:329:12 [INFO] [stdout] | [INFO] [stdout] 329 | 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:363:5 [INFO] [stdout] | [INFO] [stdout] 363 | _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: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:607:15 [INFO] [stdout] | [INFO] [stdout] 607 | 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: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:79:13 [INFO] [stdout] | [INFO] [stdout] 79 | let mut v: Vec = Vec::new(); [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/annoy/annoy.rs:180:42 [INFO] [stdout] | [INFO] [stdout] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [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/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: unused `std::result::Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:611:13 [INFO] [stdout] | [INFO] [stdout] 611 | self.distance.create_split(children.as_slice(), &mut m); [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: unused `std::result::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 `std::result::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:188:21 [INFO] [stdout] | [INFO] [stdout] 188 | let EPS = 1.0 / 1024.0; [INFO] [stdout] | ^^^ help: convert the identifier to snake case: `eps` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new_with_vectors` [INFO] [stdout] --> src/annoy/annoy.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | fn new_with_vectors(_v: &[f64]) -> Leaf { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/pq/pq.rs:216:17 [INFO] [stdout] | [INFO] [stdout] 216 | 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: associated function is never used: `copy` [INFO] [stdout] --> src/annoy/annoy.rs:46:8 [INFO] [stdout] | [INFO] [stdout] 46 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison is useless due to type limits [INFO] [stdout] --> src/pq/pq.rs:222:17 [INFO] [stdout] | [INFO] [stdout] 222 | 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: associated function is never used: `normalize_distances` [INFO] [stdout] --> src/annoy/annoy.rs:271:8 [INFO] [stdout] | [INFO] [stdout] 271 | fn normalize_distances(&self, distance: f64) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `pq_initial_value` [INFO] [stdout] --> src/annoy/annoy.rs:278:8 [INFO] [stdout] | [INFO] [stdout] 278 | fn pq_initial_value(&self) -> f64 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `search_knn_ADC` should have a snake case name [INFO] [stdout] --> src/pq/pq.rs:329:12 [INFO] [stdout] | [INFO] [stdout] 329 | pub fn search_knn_ADC( [INFO] [stdout] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_knn_adc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `name` [INFO] [stdout] --> src/annoy/annoy.rs:282:8 [INFO] [stdout] | [INFO] [stdout] 282 | 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:472:12 [INFO] [stdout] | [INFO] [stdout] 472 | 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:484:12 [INFO] [stdout] | [INFO] [stdout] 484 | pub fn get_f(&self) -> usize { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant is never used: `V_ARRAY_SIZE` [INFO] [stdout] --> src/annoy/def.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub const V_ARRAY_SIZE: usize = 65536; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance` [INFO] [stdout] --> src/common/calc.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn enclidean_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `enclidean_distance_range` [INFO] [stdout] --> src/common/calc.rs:48:8 [INFO] [stdout] | [INFO] [stdout] 48 | pub fn enclidean_distance_range( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/common/neighbor.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn new(idx: usize, distance: f64) -> Neighbor { [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: function is never used: `test_annoy` [INFO] [stdout] --> src/main.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn test_annoy() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `test_hnsw` [INFO] [stdout] --> src/main.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn test_hnsw() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | aix.add_item(i as i32, &f, angular); [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: unused `std::result::Result` that must be used [INFO] [stdout] --> src/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | indexer.add_item(i, &f); [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: structure field `_K` should have a snake case name [INFO] [stdout] --> src/annoy/annoy.rs:363:5 [INFO] [stdout] | [INFO] [stdout] 363 | _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: constant `attempt` should have an upper case name [INFO] [stdout] --> src/annoy/annoy.rs:607:15 [INFO] [stdout] | [INFO] [stdout] 607 | 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 `std::result::Result` that must be used [INFO] [stdout] --> src/annoy/annoy.rs:611:13 [INFO] [stdout] | [INFO] [stdout] 611 | self.distance.create_split(children.as_slice(), &mut m); [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 `std::result::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 `std::result::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: 104 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 93 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 2.47s [INFO] running `Command { std: "docker" "inspect" "b84a9702e03ae97fd4f9a28599821cf5e62c807742d30ecbde460682c96537c3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b84a9702e03ae97fd4f9a28599821cf5e62c807742d30ecbde460682c96537c3", kill_on_drop: false }` [INFO] [stdout] b84a9702e03ae97fd4f9a28599821cf5e62c807742d30ecbde460682c96537c3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1/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:6eabd152ff4036248d66efda456a36cb33d24b7291b33f25f75140726c88da35" "/opt/rustwide/cargo-home/bin/cargo" "+eafdee2dfae8c2233b74f98b123308be7ccefcc6" "test" "--frozen", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] f5f609c2b706e6c990b1dfbfe30c78e3bd8fff175abf82a86c736bb1f2180947 [INFO] running `Command { std: "docker" "start" "-a" "f5f609c2b706e6c990b1dfbfe30c78e3bd8fff175abf82a86c736bb1f2180947", kill_on_drop: false }` [INFO] [stderr] warning: unused import: `std::collections::HashMap` [INFO] [stderr] --> src/annoy/annoy.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use std::collections::HashMap; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `crate::common::calc::manhanttan_distance` [INFO] [stderr] --> src/common/node.rs:1:5 [INFO] [stderr] | [INFO] [stderr] 1 | use crate::common::calc::manhanttan_distance; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `while` condition [INFO] [stderr] --> src/hnsw/hnsw.rs:75:15 [INFO] [stderr] | [INFO] [stderr] 75 | while (ret < self._max_level) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_parens)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::collections::HashSet` [INFO] [stderr] --> src/pq/pq.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use std::collections::HashSet; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaves` [INFO] [stderr] --> src/annoy/annoy.rs:144:26 [INFO] [stderr] | [INFO] [stderr] 144 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:146:26 [INFO] [stderr] | [INFO] [stderr] 146 | fn zero_value(&self, src: &mut Leaf) {} [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:166:25 [INFO] [stderr] | [INFO] [stderr] 166 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:172:20 [INFO] [stderr] | [INFO] [stderr] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> bool { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `dst` [INFO] [stderr] --> src/annoy/annoy.rs:172:32 [INFO] [stderr] | [INFO] [stderr] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> bool { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:176:22 [INFO] [stderr] | [INFO] [stderr] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> Result { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `dst` [INFO] [stderr] --> src/annoy/annoy.rs:176:34 [INFO] [stderr] | [INFO] [stderr] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> Result { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `distance` [INFO] [stderr] --> src/annoy/annoy.rs:180:27 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_distance` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `margin` [INFO] [stderr] --> src/annoy/annoy.rs:180:42 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_margin` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `child_nr` [INFO] [stderr] --> src/annoy/annoy.rs:180:59 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_child_nr` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `filename` [INFO] [stderr] --> src/annoy/annoy.rs:315:20 [INFO] [stderr] | [INFO] [stderr] 315 | fn save(&self, filename: &str) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_filename` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:321:28 [INFO] [stderr] | [INFO] [stderr] 321 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `j` [INFO] [stderr] --> src/annoy/annoy.rs:321:36 [INFO] [stderr] | [INFO] [stderr] 321 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `idx` [INFO] [stderr] --> src/annoy/annoy.rs:326:9 [INFO] [stderr] | [INFO] [stderr] 326 | idx: i32, [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/annoy.rs:327:9 [INFO] [stderr] | [INFO] [stderr] 327 | n: usize, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `search_k` [INFO] [stderr] --> src/annoy/annoy.rs:328:9 [INFO] [stderr] | [INFO] [stderr] 328 | search_k: i32, [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `f` [INFO] [stderr] --> src/annoy/annoy.rs:334:9 [INFO] [stderr] | [INFO] [stderr] 334 | f: &[f64], [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/annoy.rs:335:9 [INFO] [stderr] | [INFO] [stderr] 335 | n: usize, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `search_k` [INFO] [stderr] --> src/annoy/annoy.rs:336:9 [INFO] [stderr] | [INFO] [stderr] 336 | search_k: i32, [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `v` [INFO] [stderr] --> src/annoy/annoy.rs:346:23 [INFO] [stderr] | [INFO] [stderr] 346 | fn verbose(&self, v: bool) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `item` [INFO] [stderr] --> src/annoy/annoy.rs:347:24 [INFO] [stderr] | [INFO] [stderr] 347 | fn get_item(&self, item: f64) -> Result { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `q` [INFO] [stderr] --> src/annoy/annoy.rs:350:28 [INFO] [stderr] | [INFO] [stderr] 350 | fn set_seed(&mut self, q: i32) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:224:17 [INFO] [stderr] | [INFO] [stderr] 224 | Err(e) => { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:254:17 [INFO] [stderr] | [INFO] [stderr] 254 | Err(e) => return, // do nothing [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:301:25 [INFO] [stderr] | [INFO] [stderr] 301 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `item` [INFO] [stderr] --> src/annoy/annoy.rs:377:28 [INFO] [stderr] | [INFO] [stderr] 377 | fn add_item(&mut self, item: i32, w: &[f64], d: D) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:508:17 [INFO] [stderr] | [INFO] [stderr] 508 | for i in 0..diff { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:552:21 [INFO] [stderr] | [INFO] [stderr] 552 | Err(e) => continue, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:608:13 [INFO] [stderr] | [INFO] [stderr] 608 | for i in 0..attempt { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:659:21 [INFO] [stderr] | [INFO] [stderr] 659 | Err(e) => continue, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:696:13 [INFO] [stderr] | [INFO] [stderr] 696 | let leaf = Leaf::new(); [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/random.rs:21:17 [INFO] [stderr] | [INFO] [stderr] 21 | pub fn set_seed(n: i32) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `k` [INFO] [stderr] --> src/hnsw/hnsw.rs:256:25 [INFO] [stderr] | [INFO] [stderr] 256 | for k in 0..n_neigh { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/hnsw/hnsw.rs:417:13 [INFO] [stderr] | [INFO] [stderr] 417 | for i in 0..cur_level { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/pq/pq.rs:67:13 [INFO] [stderr] | [INFO] [stderr] 67 | for i in 0..demension { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/pq/pq.rs:108:13 [INFO] [stderr] | [INFO] [stderr] 108 | for i in 0..n_center { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `j` [INFO] [stderr] --> src/pq/pq.rs:110:17 [INFO] [stderr] | [INFO] [stderr] 110 | for j in 0..demension { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/pq/pq.rs:116:13 [INFO] [stderr] | [INFO] [stderr] 116 | for i in 0..n_center { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `demension` [INFO] [stderr] --> src/pq/pq.rs:147:13 [INFO] [stderr] | [INFO] [stderr] 147 | let demension = self._demension; [INFO] [stderr] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_demension` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/pq/pq.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | for i in 0..n_sub { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/annoy/annoy.rs:180:42 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ----^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_mut)]` on by default [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/hnsw/hnsw.rs:415:13 [INFO] [stderr] | [INFO] [stderr] 415 | let mut neigh0: Vec = Vec::new(); [INFO] [stderr] | ----^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new_with_vectors` [INFO] [stderr] --> src/annoy/annoy.rs:30:8 [INFO] [stderr] | [INFO] [stderr] 30 | fn new_with_vectors(_v: &[f64]) -> Leaf { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `copy` [INFO] [stderr] --> src/annoy/annoy.rs:46:8 [INFO] [stderr] | [INFO] [stderr] 46 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `normalize_distances` [INFO] [stderr] --> src/annoy/annoy.rs:271:8 [INFO] [stderr] | [INFO] [stderr] 271 | fn normalize_distances(&self, distance: f64) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `pq_initial_value` [INFO] [stderr] --> src/annoy/annoy.rs:278:8 [INFO] [stderr] | [INFO] [stderr] 278 | fn pq_initial_value(&self) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `name` [INFO] [stderr] --> src/annoy/annoy.rs:282:8 [INFO] [stderr] | [INFO] [stderr] 282 | fn name(&self) -> &'static str { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/annoy/annoy.rs:472:12 [INFO] [stderr] | [INFO] [stderr] 472 | pub fn new(f: usize, d: D) -> AnnoyIndex { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_f` [INFO] [stderr] --> src/annoy/annoy.rs:484:12 [INFO] [stderr] | [INFO] [stderr] 484 | pub fn get_f(&self) -> usize { [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant is never used: `V_ARRAY_SIZE` [INFO] [stderr] --> src/annoy/def.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | pub const V_ARRAY_SIZE: usize = 65536; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `manhanttan_distance` [INFO] [stderr] --> src/common/calc.rs:19:8 [INFO] [stderr] | [INFO] [stderr] 19 | pub fn manhanttan_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `enclidean_distance` [INFO] [stderr] --> src/common/calc.rs:33:8 [INFO] [stderr] | [INFO] [stderr] 33 | pub fn enclidean_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `enclidean_distance_range` [INFO] [stderr] --> src/common/calc.rs:48:8 [INFO] [stderr] | [INFO] [stderr] 48 | pub fn enclidean_distance_range( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/common/neighbor.rs:10:12 [INFO] [stderr] | [INFO] [stderr] 10 | pub fn new(idx: usize, distance: f64) -> Neighbor { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/common/node.rs:41:12 [INFO] [stderr] | [INFO] [stderr] 41 | pub fn new(vectors: &[E]) -> Node { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `distance` [INFO] [stderr] --> src/common/node.rs:48:12 [INFO] [stderr] | [INFO] [stderr] 48 | pub fn distance(&self, other: &Node, cal: F) -> Result [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/hnsw/hnsw.rs:15:8 [INFO] [stderr] | [INFO] [stderr] 15 | fn new() -> Data { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new_with_vectors` [INFO] [stderr] --> src/hnsw/hnsw.rs:22:8 [INFO] [stderr] | [INFO] [stderr] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `distance` [INFO] [stderr] --> src/hnsw/hnsw.rs:29:8 [INFO] [stderr] | [INFO] [stderr] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/hnsw/hnsw.rs:56:12 [INFO] [stderr] | [INFO] [stderr] 56 | pub fn new(demension: usize) -> HnswIndexer { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_random_level` [INFO] [stderr] --> src/hnsw/hnsw.rs:72:8 [INFO] [stderr] | [INFO] [stderr] 72 | fn get_random_level(&self) -> usize { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_neighbors_by_heuristic2` [INFO] [stderr] --> src/hnsw/hnsw.rs:89:8 [INFO] [stderr] | [INFO] [stderr] 89 | fn get_neighbors_by_heuristic2( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:135:8 [INFO] [stderr] | [INFO] [stderr] 135 | fn get_neighbor(&self, id: usize, level: usize) -> &Vec { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `clear_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:142:8 [INFO] [stderr] | [INFO] [stderr] 142 | fn clear_neighbor(&mut self, id: usize, level: usize) { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `set_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:150:8 [INFO] [stderr] | [INFO] [stderr] 150 | fn set_neighbor(&mut self, id: usize, level: usize, pos: usize, neighbor_id: usize) { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `push_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:158:8 [INFO] [stderr] | [INFO] [stderr] 158 | fn push_neighbor(&mut self, id: usize, level: usize, neighbor_id: usize) { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_level` [INFO] [stderr] --> src/hnsw/hnsw.rs:166:8 [INFO] [stderr] | [INFO] [stderr] 166 | fn get_level(&self, id: usize) -> usize { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `connect_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:170:8 [INFO] [stderr] | [INFO] [stderr] 170 | fn connect_neighbor( [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `delete_id` [INFO] [stderr] --> src/hnsw/hnsw.rs:272:12 [INFO] [stderr] | [INFO] [stderr] 272 | pub fn delete_id(&mut self, id: usize) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `is_deleted` [INFO] [stderr] --> src/hnsw/hnsw.rs:283:12 [INFO] [stderr] | [INFO] [stderr] 283 | pub fn is_deleted(&self, id: usize) -> bool { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_data` [INFO] [stderr] --> src/hnsw/hnsw.rs:287:12 [INFO] [stderr] | [INFO] [stderr] 287 | pub fn get_data(&self, id: usize) -> &Vec { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_vec` [INFO] [stderr] --> src/hnsw/hnsw.rs:291:12 [INFO] [stderr] | [INFO] [stderr] 291 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_id` [INFO] [stderr] --> src/hnsw/hnsw.rs:295:12 [INFO] [stderr] | [INFO] [stderr] 295 | pub fn get_distance_from_id(&self, x: usize, y: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_laryer` [INFO] [stderr] --> src/hnsw/hnsw.rs:300:12 [INFO] [stderr] | [INFO] [stderr] 300 | pub fn search_laryer( [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_laryer_default` [INFO] [stderr] --> src/hnsw/hnsw.rs:360:12 [INFO] [stderr] | [INFO] [stderr] 360 | pub fn search_laryer_default( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_knn` [INFO] [stderr] --> src/hnsw/hnsw.rs:369:12 [INFO] [stderr] | [INFO] [stderr] 369 | pub fn search_knn( [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `init_item` [INFO] [stderr] --> src/hnsw/hnsw.rs:412:12 [INFO] [stderr] | [INFO] [stderr] 412 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `add_item` [INFO] [stderr] --> src/hnsw/hnsw.rs:430:12 [INFO] [stderr] | [INFO] [stderr] 430 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/pq/pq.rs:15:8 [INFO] [stderr] | [INFO] [stderr] 15 | fn new() -> Data { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new_with_vectors` [INFO] [stderr] --> src/pq/pq.rs:22:8 [INFO] [stderr] | [INFO] [stderr] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `distance` [INFO] [stderr] --> src/pq/pq.rs:29:8 [INFO] [stderr] | [INFO] [stderr] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/pq/pq.rs:46:12 [INFO] [stderr] | [INFO] [stderr] 46 | pub fn new(demension: usize, n_center: usize, _n_epoch: usize) -> KmeansIndexer { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_vec` [INFO] [stderr] --> src/pq/pq.rs:57:12 [INFO] [stderr] | [INFO] [stderr] 57 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `init_center` [INFO] [stderr] --> src/pq/pq.rs:62:12 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn init_center(&mut self, batch_size: usize, batch_data: &Vec>) { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `update_center` [INFO] [stderr] --> src/pq/pq.rs:98:8 [INFO] [stderr] | [INFO] [stderr] 98 | fn update_center( [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_data` [INFO] [stderr] --> src/pq/pq.rs:140:8 [INFO] [stderr] | [INFO] [stderr] 140 | fn search_data( [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `split_center` [INFO] [stderr] --> src/pq/pq.rs:163:8 [INFO] [stderr] | [INFO] [stderr] 163 | fn split_center( [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `train` [INFO] [stderr] --> src/pq/pq.rs:207:12 [INFO] [stderr] | [INFO] [stderr] 207 | pub fn train(&mut self, batch_size: usize, batch_data: &Vec>) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `set_range` [INFO] [stderr] --> src/pq/pq.rs:221:12 [INFO] [stderr] | [INFO] [stderr] 221 | pub fn set_range(&mut self, begin: usize, end: usize) { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/pq/pq.rs:250:12 [INFO] [stderr] | [INFO] [stderr] 250 | pub fn new(demension: usize, n_sub: usize, sub_bits: usize, train_epoch: usize) -> PQIndexer { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `init_item` [INFO] [stderr] --> src/pq/pq.rs:273:12 [INFO] [stderr] | [INFO] [stderr] 273 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `add_item` [INFO] [stderr] --> src/pq/pq.rs:281:12 [INFO] [stderr] | [INFO] [stderr] 281 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `train_center` [INFO] [stderr] --> src/pq/pq.rs:298:12 [INFO] [stderr] | [INFO] [stderr] 298 | pub fn train_center(&mut self) { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_vec_range` [INFO] [stderr] --> src/pq/pq.rs:319:12 [INFO] [stderr] | [INFO] [stderr] 319 | pub fn get_distance_from_vec_range( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_knn_ADC` [INFO] [stderr] --> src/pq/pq.rs:329:12 [INFO] [stderr] | [INFO] [stderr] 329 | pub fn search_knn_ADC( [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: structure field `_K` should have a snake case name [INFO] [stderr] --> src/annoy/annoy.rs:363:5 [INFO] [stderr] | [INFO] [stderr] 363 | _K: i32, // max number of n_descendants to fit into leaf [INFO] [stderr] | ^^ help: convert the identifier to snake case (notice the capitalization): `_k` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` on by default [INFO] [stderr] [INFO] [stderr] warning: constant `attempt` should have an upper case name [INFO] [stderr] --> src/annoy/annoy.rs:607:15 [INFO] [stderr] | [INFO] [stderr] 607 | const attempt: usize = 3; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to upper case: `ATTEMPT` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/annoy/annoy.rs:611:13 [INFO] [stderr] | [INFO] [stderr] 611 | self.distance.create_split(children.as_slice(), &mut m); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_must_use)]` on by default [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/hnsw/hnsw.rs:182:9 [INFO] [stderr] | [INFO] [stderr] 182 | self.get_neighbors_by_heuristic2(top_candidates, n_neigh); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/hnsw/hnsw.rs:253:21 [INFO] [stderr] | [INFO] [stderr] 253 | self.get_neighbors_by_heuristic2(&mut candidates, n_neigh); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: variable `EPS` should have a snake case name [INFO] [stderr] --> src/pq/pq.rs:188:21 [INFO] [stderr] | [INFO] [stderr] 188 | let EPS = 1.0 / 1024.0; [INFO] [stderr] | ^^^ help: convert the identifier to snake case: `eps` [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/pq/pq.rs:216:17 [INFO] [stderr] | [INFO] [stderr] 216 | self.split_center(batch_size, &mut n_assigned_per_center); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: comparison is useless due to type limits [INFO] [stderr] --> src/pq/pq.rs:222:17 [INFO] [stderr] | [INFO] [stderr] 222 | assert!(begin >= 0 && end - begin == self._demension); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stderr] [INFO] [stderr] warning: method `search_knn_ADC` should have a snake case name [INFO] [stderr] --> src/pq/pq.rs:329:12 [INFO] [stderr] | [INFO] [stderr] 329 | pub fn search_knn_ADC( [INFO] [stderr] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_knn_adc` [INFO] [stderr] [INFO] [stderr] warning: 108 warnings emitted [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::collections::HashMap` [INFO] [stderr] --> src/annoy/annoy.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use std::collections::HashMap; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `while` condition [INFO] [stderr] --> src/hnsw/hnsw.rs:75:15 [INFO] [stderr] | [INFO] [stderr] 75 | while (ret < self._max_level) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_parens)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::collections::HashSet` [INFO] [stderr] --> src/pq/pq.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use std::collections::HashSet; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaves` [INFO] [stderr] --> src/annoy/annoy.rs:144:26 [INFO] [stderr] | [INFO] [stderr] 144 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:146:26 [INFO] [stderr] | [INFO] [stderr] 146 | fn zero_value(&self, src: &mut Leaf) {} [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:166:25 [INFO] [stderr] | [INFO] [stderr] 166 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:172:20 [INFO] [stderr] | [INFO] [stderr] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> bool { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `dst` [INFO] [stderr] --> src/annoy/annoy.rs:172:32 [INFO] [stderr] | [INFO] [stderr] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> bool { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:176:22 [INFO] [stderr] | [INFO] [stderr] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> Result { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `dst` [INFO] [stderr] --> src/annoy/annoy.rs:176:34 [INFO] [stderr] | [INFO] [stderr] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> Result { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `distance` [INFO] [stderr] --> src/annoy/annoy.rs:180:27 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_distance` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `margin` [INFO] [stderr] --> src/annoy/annoy.rs:180:42 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_margin` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `child_nr` [INFO] [stderr] --> src/annoy/annoy.rs:180:59 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_child_nr` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `filename` [INFO] [stderr] --> src/annoy/annoy.rs:315:20 [INFO] [stderr] | [INFO] [stderr] 315 | fn save(&self, filename: &str) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_filename` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:321:28 [INFO] [stderr] | [INFO] [stderr] 321 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `j` [INFO] [stderr] --> src/annoy/annoy.rs:321:36 [INFO] [stderr] | [INFO] [stderr] 321 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `idx` [INFO] [stderr] --> src/annoy/annoy.rs:326:9 [INFO] [stderr] | [INFO] [stderr] 326 | idx: i32, [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/annoy.rs:327:9 [INFO] [stderr] | [INFO] [stderr] 327 | n: usize, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `search_k` [INFO] [stderr] --> src/annoy/annoy.rs:328:9 [INFO] [stderr] | [INFO] [stderr] 328 | search_k: i32, [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `f` [INFO] [stderr] --> src/annoy/annoy.rs:334:9 [INFO] [stderr] | [INFO] [stderr] 334 | f: &[f64], [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/annoy.rs:335:9 [INFO] [stderr] | [INFO] [stderr] 335 | n: usize, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `search_k` [INFO] [stderr] --> src/annoy/annoy.rs:336:9 [INFO] [stderr] | [INFO] [stderr] 336 | search_k: i32, [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `v` [INFO] [stderr] --> src/annoy/annoy.rs:346:23 [INFO] [stderr] | [INFO] [stderr] 346 | fn verbose(&self, v: bool) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `item` [INFO] [stderr] --> src/annoy/annoy.rs:347:24 [INFO] [stderr] | [INFO] [stderr] 347 | fn get_item(&self, item: f64) -> Result { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `q` [INFO] [stderr] --> src/annoy/annoy.rs:350:28 [INFO] [stderr] | [INFO] [stderr] 350 | fn set_seed(&mut self, q: i32) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:224:17 [INFO] [stderr] | [INFO] [stderr] 224 | Err(e) => { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:254:17 [INFO] [stderr] | [INFO] [stderr] 254 | Err(e) => return, // do nothing [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:301:25 [INFO] [stderr] | [INFO] [stderr] 301 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `item` [INFO] [stderr] --> src/annoy/annoy.rs:377:28 [INFO] [stderr] | [INFO] [stderr] 377 | fn add_item(&mut self, item: i32, w: &[f64], d: D) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:508:17 [INFO] [stderr] | [INFO] [stderr] 508 | for i in 0..diff { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:552:21 [INFO] [stderr] | [INFO] [stderr] 552 | Err(e) => continue, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:608:13 [INFO] [stderr] | [INFO] [stderr] 608 | for i in 0..attempt { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:659:21 [INFO] [stderr] | [INFO] [stderr] 659 | Err(e) => continue, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:696:13 [INFO] [stderr] | [INFO] [stderr] 696 | let leaf = Leaf::new(); [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/random.rs:21:17 [INFO] [stderr] | [INFO] [stderr] 21 | pub fn set_seed(n: i32) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `k` [INFO] [stderr] --> src/hnsw/hnsw.rs:256:25 [INFO] [stderr] | [INFO] [stderr] 256 | for k in 0..n_neigh { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/hnsw/hnsw.rs:417:13 [INFO] [stderr] | [INFO] [stderr] 417 | for i in 0..cur_level { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/pq/pq.rs:67:13 [INFO] [stderr] | [INFO] [stderr] 67 | for i in 0..demension { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/pq/pq.rs:108:13 [INFO] [stderr] | [INFO] [stderr] 108 | for i in 0..n_center { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `j` [INFO] [stderr] --> src/pq/pq.rs:110:17 [INFO] [stderr] | [INFO] [stderr] 110 | for j in 0..demension { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/pq/pq.rs:116:13 [INFO] [stderr] | [INFO] [stderr] 116 | for i in 0..n_center { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `demension` [INFO] [stderr] --> src/pq/pq.rs:147:13 [INFO] [stderr] | [INFO] [stderr] 147 | let demension = self._demension; [INFO] [stderr] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_demension` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/pq/pq.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | for i in 0..n_sub { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/annoy/annoy.rs:180:42 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ----^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_mut)]` on by default [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/hnsw/hnsw.rs:415:13 [INFO] [stderr] | [INFO] [stderr] 415 | let mut neigh0: Vec = Vec::new(); [INFO] [stderr] | ----^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new_with_vectors` [INFO] [stderr] --> src/annoy/annoy.rs:30:8 [INFO] [stderr] | [INFO] [stderr] 30 | fn new_with_vectors(_v: &[f64]) -> Leaf { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `copy` [INFO] [stderr] --> src/annoy/annoy.rs:46:8 [INFO] [stderr] | [INFO] [stderr] 46 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `normalize_distances` [INFO] [stderr] --> src/annoy/annoy.rs:271:8 [INFO] [stderr] | [INFO] [stderr] 271 | fn normalize_distances(&self, distance: f64) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `pq_initial_value` [INFO] [stderr] --> src/annoy/annoy.rs:278:8 [INFO] [stderr] | [INFO] [stderr] 278 | fn pq_initial_value(&self) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `name` [INFO] [stderr] --> src/annoy/annoy.rs:282:8 [INFO] [stderr] | [INFO] [stderr] 282 | fn name(&self) -> &'static str { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/annoy/annoy.rs:472:12 [INFO] [stderr] | [INFO] [stderr] 472 | pub fn new(f: usize, d: D) -> AnnoyIndex { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_f` [INFO] [stderr] --> src/annoy/annoy.rs:484:12 [INFO] [stderr] | [INFO] [stderr] 484 | pub fn get_f(&self) -> usize { [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant is never used: `V_ARRAY_SIZE` [INFO] [stderr] --> src/annoy/def.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | pub const V_ARRAY_SIZE: usize = 65536; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `enclidean_distance` [INFO] [stderr] --> src/common/calc.rs:33:8 [INFO] [stderr] | [INFO] [stderr] 33 | pub fn enclidean_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `enclidean_distance_range` [INFO] [stderr] --> src/common/calc.rs:48:8 [INFO] [stderr] | [INFO] [stderr] 48 | pub fn enclidean_distance_range( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/common/neighbor.rs:10:12 [INFO] [stderr] | [INFO] [stderr] 10 | pub fn new(idx: usize, distance: f64) -> Neighbor { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/hnsw/hnsw.rs:15:8 [INFO] [stderr] | [INFO] [stderr] 15 | fn new() -> Data { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new_with_vectors` [INFO] [stderr] --> src/hnsw/hnsw.rs:22:8 [INFO] [stderr] | [INFO] [stderr] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `distance` [INFO] [stderr] --> src/hnsw/hnsw.rs:29:8 [INFO] [stderr] | [INFO] [stderr] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/hnsw/hnsw.rs:56:12 [INFO] [stderr] | [INFO] [stderr] 56 | pub fn new(demension: usize) -> HnswIndexer { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_random_level` [INFO] [stderr] --> src/hnsw/hnsw.rs:72:8 [INFO] [stderr] | [INFO] [stderr] 72 | fn get_random_level(&self) -> usize { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_neighbors_by_heuristic2` [INFO] [stderr] --> src/hnsw/hnsw.rs:89:8 [INFO] [stderr] | [INFO] [stderr] 89 | fn get_neighbors_by_heuristic2( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:135:8 [INFO] [stderr] | [INFO] [stderr] 135 | fn get_neighbor(&self, id: usize, level: usize) -> &Vec { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `clear_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:142:8 [INFO] [stderr] | [INFO] [stderr] 142 | fn clear_neighbor(&mut self, id: usize, level: usize) { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `set_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:150:8 [INFO] [stderr] | [INFO] [stderr] 150 | fn set_neighbor(&mut self, id: usize, level: usize, pos: usize, neighbor_id: usize) { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `push_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:158:8 [INFO] [stderr] | [INFO] [stderr] 158 | fn push_neighbor(&mut self, id: usize, level: usize, neighbor_id: usize) { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_level` [INFO] [stderr] --> src/hnsw/hnsw.rs:166:8 [INFO] [stderr] | [INFO] [stderr] 166 | fn get_level(&self, id: usize) -> usize { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `connect_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:170:8 [INFO] [stderr] | [INFO] [stderr] 170 | fn connect_neighbor( [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `delete_id` [INFO] [stderr] --> src/hnsw/hnsw.rs:272:12 [INFO] [stderr] | [INFO] [stderr] 272 | pub fn delete_id(&mut self, id: usize) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `is_deleted` [INFO] [stderr] --> src/hnsw/hnsw.rs:283:12 [INFO] [stderr] | [INFO] [stderr] 283 | pub fn is_deleted(&self, id: usize) -> bool { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_data` [INFO] [stderr] --> src/hnsw/hnsw.rs:287:12 [INFO] [stderr] | [INFO] [stderr] 287 | pub fn get_data(&self, id: usize) -> &Vec { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_vec` [INFO] [stderr] --> src/hnsw/hnsw.rs:291:12 [INFO] [stderr] | [INFO] [stderr] 291 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_id` [INFO] [stderr] --> src/hnsw/hnsw.rs:295:12 [INFO] [stderr] | [INFO] [stderr] 295 | pub fn get_distance_from_id(&self, x: usize, y: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_laryer` [INFO] [stderr] --> src/hnsw/hnsw.rs:300:12 [INFO] [stderr] | [INFO] [stderr] 300 | pub fn search_laryer( [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_laryer_default` [INFO] [stderr] --> src/hnsw/hnsw.rs:360:12 [INFO] [stderr] | [INFO] [stderr] 360 | pub fn search_laryer_default( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_knn` [INFO] [stderr] --> src/hnsw/hnsw.rs:369:12 [INFO] [stderr] | [INFO] [stderr] 369 | pub fn search_knn( [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `init_item` [INFO] [stderr] --> src/hnsw/hnsw.rs:412:12 [INFO] [stderr] | [INFO] [stderr] 412 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `add_item` [INFO] [stderr] --> src/hnsw/hnsw.rs:430:12 [INFO] [stderr] | [INFO] [stderr] 430 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/pq/pq.rs:15:8 [INFO] [stderr] | [INFO] [stderr] 15 | fn new() -> Data { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new_with_vectors` [INFO] [stderr] --> src/pq/pq.rs:22:8 [INFO] [stderr] | [INFO] [stderr] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `distance` [INFO] [stderr] --> src/pq/pq.rs:29:8 [INFO] [stderr] | [INFO] [stderr] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/pq/pq.rs:46:12 [INFO] [stderr] | [INFO] [stderr] 46 | pub fn new(demension: usize, n_center: usize, _n_epoch: usize) -> KmeansIndexer { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_vec` [INFO] [stderr] --> src/pq/pq.rs:57:12 [INFO] [stderr] | [INFO] [stderr] 57 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `init_center` [INFO] [stderr] --> src/pq/pq.rs:62:12 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn init_center(&mut self, batch_size: usize, batch_data: &Vec>) { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `update_center` [INFO] [stderr] --> src/pq/pq.rs:98:8 [INFO] [stderr] | [INFO] [stderr] 98 | fn update_center( [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_data` [INFO] [stderr] --> src/pq/pq.rs:140:8 [INFO] [stderr] | [INFO] [stderr] 140 | fn search_data( [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `split_center` [INFO] [stderr] --> src/pq/pq.rs:163:8 [INFO] [stderr] | [INFO] [stderr] 163 | fn split_center( [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `train` [INFO] [stderr] --> src/pq/pq.rs:207:12 [INFO] [stderr] | [INFO] [stderr] 207 | pub fn train(&mut self, batch_size: usize, batch_data: &Vec>) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `set_range` [INFO] [stderr] --> src/pq/pq.rs:221:12 [INFO] [stderr] | [INFO] [stderr] 221 | pub fn set_range(&mut self, begin: usize, end: usize) { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/pq/pq.rs:250:12 [INFO] [stderr] | [INFO] [stderr] 250 | pub fn new(demension: usize, n_sub: usize, sub_bits: usize, train_epoch: usize) -> PQIndexer { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `init_item` [INFO] [stderr] --> src/pq/pq.rs:273:12 [INFO] [stderr] | [INFO] [stderr] 273 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `add_item` [INFO] [stderr] --> src/pq/pq.rs:281:12 [INFO] [stderr] | [INFO] [stderr] 281 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `train_center` [INFO] [stderr] --> src/pq/pq.rs:298:12 [INFO] [stderr] | [INFO] [stderr] 298 | pub fn train_center(&mut self) { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_vec_range` [INFO] [stderr] --> src/pq/pq.rs:319:12 [INFO] [stderr] | [INFO] [stderr] 319 | pub fn get_distance_from_vec_range( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_knn_ADC` [INFO] [stderr] --> src/pq/pq.rs:329:12 [INFO] [stderr] | [INFO] [stderr] 329 | pub fn search_knn_ADC( [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: structure field `_K` should have a snake case name [INFO] [stderr] --> src/annoy/annoy.rs:363:5 [INFO] [stderr] | [INFO] [stderr] 363 | _K: i32, // max number of n_descendants to fit into leaf [INFO] [stderr] | ^^ help: convert the identifier to snake case (notice the capitalization): `_k` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` on by default [INFO] [stderr] [INFO] [stderr] warning: constant `attempt` should have an upper case name [INFO] [stderr] --> src/annoy/annoy.rs:607:15 [INFO] [stderr] | [INFO] [stderr] 607 | const attempt: usize = 3; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to upper case: `ATTEMPT` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/annoy/annoy.rs:611:13 [INFO] [stderr] | [INFO] [stderr] 611 | self.distance.create_split(children.as_slice(), &mut m); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_must_use)]` on by default [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/hnsw/hnsw.rs:182:9 [INFO] [stderr] | [INFO] [stderr] 182 | self.get_neighbors_by_heuristic2(top_candidates, n_neigh); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/hnsw/hnsw.rs:253:21 [INFO] [stderr] | [INFO] [stderr] 253 | self.get_neighbors_by_heuristic2(&mut candidates, n_neigh); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: variable `EPS` should have a snake case name [INFO] [stderr] --> src/pq/pq.rs:188:21 [INFO] [stderr] | [INFO] [stderr] 188 | let EPS = 1.0 / 1024.0; [INFO] [stderr] | ^^^ help: convert the identifier to snake case: `eps` [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/pq/pq.rs:216:17 [INFO] [stderr] | [INFO] [stderr] 216 | self.split_center(batch_size, &mut n_assigned_per_center); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: comparison is useless due to type limits [INFO] [stderr] --> src/pq/pq.rs:222:17 [INFO] [stderr] | [INFO] [stderr] 222 | assert!(begin >= 0 && end - begin == self._demension); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_comparisons)]` on by default [INFO] [stderr] [INFO] [stderr] warning: method `search_knn_ADC` should have a snake case name [INFO] [stderr] --> src/pq/pq.rs:329:12 [INFO] [stderr] | [INFO] [stderr] 329 | pub fn search_knn_ADC( [INFO] [stderr] | ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `search_knn_adc` [INFO] [stderr] [INFO] [stderr] warning: 104 warnings emitted [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::collections::HashMap` [INFO] [stderr] --> src/annoy/annoy.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use std::collections::HashMap; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around `while` condition [INFO] [stderr] --> src/hnsw/hnsw.rs:75:15 [INFO] [stderr] | [INFO] [stderr] 75 | while (ret < self._max_level) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_parens)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused imports: `Alphanumeric`, `Uniform` [INFO] [stderr] --> src/main.rs:5:27 [INFO] [stderr] | [INFO] [stderr] 5 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stderr] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `Normal` [INFO] [stderr] --> src/main.rs:6:41 [INFO] [stderr] | [INFO] [stderr] 6 | use rand::distributions::{Distribution, Normal}; [INFO] [stderr] | ^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `thread_rng` [INFO] [stderr] --> src/main.rs:7:12 [INFO] [stderr] | [INFO] [stderr] 7 | use rand::{thread_rng, Rng}; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stderr] --> src/main.rs:5:41 [INFO] [stderr] | [INFO] [stderr] 5 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(deprecated)]` on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated struct `rand::distributions::Normal`: moved to rand_distr crate [INFO] [stderr] --> src/main.rs:6:41 [INFO] [stderr] | [INFO] [stderr] 6 | use rand::distributions::{Distribution, Normal}; [INFO] [stderr] | ^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stderr] --> src/main.rs:81:53 [INFO] [stderr] | [INFO] [stderr] 81 | let v_iter: Vec = rng.sample_iter(&StandardNormal).take(dimension).collect(); [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated struct `rand::distributions::StandardNormal`: moved to rand_distr crate [INFO] [stderr] --> src/main.rs:5:41 [INFO] [stderr] | [INFO] [stderr] 5 | use rand::distributions::{Alphanumeric, StandardNormal, Uniform}; [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `Distribution` [INFO] [stderr] --> src/main.rs:6:27 [INFO] [stderr] | [INFO] [stderr] 6 | use rand::distributions::{Distribution, Normal}; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/main.rs:72:9 [INFO] [stderr] | [INFO] [stderr] 72 | for i in 0..clustering_n { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/main.rs:74:13 [INFO] [stderr] | [INFO] [stderr] 74 | for i in 0..dimension { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `v` [INFO] [stderr] --> src/main.rs:79:13 [INFO] [stderr] | [INFO] [stderr] 79 | let mut v: Vec = Vec::new(); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/main.rs:80:13 [INFO] [stderr] | [INFO] [stderr] 80 | for i in 0..node_n { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaves` [INFO] [stderr] --> src/annoy/annoy.rs:144:26 [INFO] [stderr] | [INFO] [stderr] 144 | fn preprocess(&self, leaves: &[Leaf]) {} [INFO] [stderr] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_leaves` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:146:26 [INFO] [stderr] | [INFO] [stderr] 146 | fn zero_value(&self, src: &mut Leaf) {} [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:166:25 [INFO] [stderr] | [INFO] [stderr] 166 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:172:20 [INFO] [stderr] | [INFO] [stderr] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> bool { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `dst` [INFO] [stderr] --> src/annoy/annoy.rs:172:32 [INFO] [stderr] | [INFO] [stderr] 172 | fn side(&self, src: &Leaf, dst: &[f64]) -> bool { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `src` [INFO] [stderr] --> src/annoy/annoy.rs:176:22 [INFO] [stderr] | [INFO] [stderr] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> Result { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_src` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `dst` [INFO] [stderr] --> src/annoy/annoy.rs:176:34 [INFO] [stderr] | [INFO] [stderr] 176 | fn margin(&self, src: &Leaf, dst: &[f64]) -> Result { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_dst` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `distance` [INFO] [stderr] --> src/annoy/annoy.rs:180:27 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_distance` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `margin` [INFO] [stderr] --> src/annoy/annoy.rs:180:42 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_margin` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `child_nr` [INFO] [stderr] --> src/annoy/annoy.rs:180:59 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_child_nr` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `filename` [INFO] [stderr] --> src/annoy/annoy.rs:315:20 [INFO] [stderr] | [INFO] [stderr] 315 | fn save(&self, filename: &str) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_filename` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:321:28 [INFO] [stderr] | [INFO] [stderr] 321 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `j` [INFO] [stderr] --> src/annoy/annoy.rs:321:36 [INFO] [stderr] | [INFO] [stderr] 321 | fn get_distance(&self, i: i32, j: i32) -> Result { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `idx` [INFO] [stderr] --> src/annoy/annoy.rs:326:9 [INFO] [stderr] | [INFO] [stderr] 326 | idx: i32, [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/annoy.rs:327:9 [INFO] [stderr] | [INFO] [stderr] 327 | n: usize, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `search_k` [INFO] [stderr] --> src/annoy/annoy.rs:328:9 [INFO] [stderr] | [INFO] [stderr] 328 | search_k: i32, [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `f` [INFO] [stderr] --> src/annoy/annoy.rs:334:9 [INFO] [stderr] | [INFO] [stderr] 334 | f: &[f64], [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/annoy.rs:335:9 [INFO] [stderr] | [INFO] [stderr] 335 | n: usize, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `search_k` [INFO] [stderr] --> src/annoy/annoy.rs:336:9 [INFO] [stderr] | [INFO] [stderr] 336 | search_k: i32, [INFO] [stderr] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_search_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `v` [INFO] [stderr] --> src/annoy/annoy.rs:346:23 [INFO] [stderr] | [INFO] [stderr] 346 | fn verbose(&self, v: bool) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `item` [INFO] [stderr] --> src/annoy/annoy.rs:347:24 [INFO] [stderr] | [INFO] [stderr] 347 | fn get_item(&self, item: f64) -> Result { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `q` [INFO] [stderr] --> src/annoy/annoy.rs:350:28 [INFO] [stderr] | [INFO] [stderr] 350 | fn set_seed(&mut self, q: i32) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_q` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:224:17 [INFO] [stderr] | [INFO] [stderr] 224 | Err(e) => { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:254:17 [INFO] [stderr] | [INFO] [stderr] 254 | Err(e) => return, // do nothing [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:301:25 [INFO] [stderr] | [INFO] [stderr] 301 | fn init_leaf(&self, leaf: &mut Leaf) {} [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `item` [INFO] [stderr] --> src/annoy/annoy.rs:377:28 [INFO] [stderr] | [INFO] [stderr] 377 | fn add_item(&mut self, item: i32, w: &[f64], d: D) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:508:17 [INFO] [stderr] | [INFO] [stderr] 508 | for i in 0..diff { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:552:21 [INFO] [stderr] | [INFO] [stderr] 552 | Err(e) => continue, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/annoy/annoy.rs:608:13 [INFO] [stderr] | [INFO] [stderr] 608 | for i in 0..attempt { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `e` [INFO] [stderr] --> src/annoy/annoy.rs:659:21 [INFO] [stderr] | [INFO] [stderr] 659 | Err(e) => continue, [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `leaf` [INFO] [stderr] --> src/annoy/annoy.rs:696:13 [INFO] [stderr] | [INFO] [stderr] 696 | let leaf = Leaf::new(); [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_leaf` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/annoy/random.rs:21:17 [INFO] [stderr] | [INFO] [stderr] 21 | pub fn set_seed(n: i32) {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `k` [INFO] [stderr] --> src/hnsw/hnsw.rs:256:25 [INFO] [stderr] | [INFO] [stderr] 256 | for k in 0..n_neigh { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_k` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `i` [INFO] [stderr] --> src/hnsw/hnsw.rs:417:13 [INFO] [stderr] | [INFO] [stderr] 417 | for i in 0..cur_level { [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/main.rs:79:13 [INFO] [stderr] | [INFO] [stderr] 79 | let mut v: Vec = Vec::new(); [INFO] [stderr] | ----^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_mut)]` on by default [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/annoy/annoy.rs:180:42 [INFO] [stderr] | [INFO] [stderr] 180 | fn pq_distance(&self, distance: f64, mut margin: f64, child_nr: usize) -> f64 { [INFO] [stderr] | ----^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/hnsw/hnsw.rs:415:13 [INFO] [stderr] | [INFO] [stderr] 415 | let mut neigh0: Vec = Vec::new(); [INFO] [stderr] | ----^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new_with_vectors` [INFO] [stderr] --> src/annoy/annoy.rs:30:8 [INFO] [stderr] | [INFO] [stderr] 30 | fn new_with_vectors(_v: &[f64]) -> Leaf { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `copy` [INFO] [stderr] --> src/annoy/annoy.rs:46:8 [INFO] [stderr] | [INFO] [stderr] 46 | fn copy(dst: &mut Leaf, src: &Leaf) { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `normalize_distances` [INFO] [stderr] --> src/annoy/annoy.rs:271:8 [INFO] [stderr] | [INFO] [stderr] 271 | fn normalize_distances(&self, distance: f64) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `pq_initial_value` [INFO] [stderr] --> src/annoy/annoy.rs:278:8 [INFO] [stderr] | [INFO] [stderr] 278 | fn pq_initial_value(&self) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `name` [INFO] [stderr] --> src/annoy/annoy.rs:282:8 [INFO] [stderr] | [INFO] [stderr] 282 | fn name(&self) -> &'static str { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/annoy/annoy.rs:472:12 [INFO] [stderr] | [INFO] [stderr] 472 | pub fn new(f: usize, d: D) -> AnnoyIndex { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_f` [INFO] [stderr] --> src/annoy/annoy.rs:484:12 [INFO] [stderr] | [INFO] [stderr] 484 | pub fn get_f(&self) -> usize { [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: constant is never used: `V_ARRAY_SIZE` [INFO] [stderr] --> src/annoy/def.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | pub const V_ARRAY_SIZE: usize = 65536; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `enclidean_distance` [INFO] [stderr] --> src/common/calc.rs:33:8 [INFO] [stderr] | [INFO] [stderr] 33 | pub fn enclidean_distance(vec1: &[T], vec2: &[T]) -> Result [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `enclidean_distance_range` [INFO] [stderr] --> src/common/calc.rs:48:8 [INFO] [stderr] | [INFO] [stderr] 48 | pub fn enclidean_distance_range( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/common/neighbor.rs:10:12 [INFO] [stderr] | [INFO] [stderr] 10 | pub fn new(idx: usize, distance: f64) -> Neighbor { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/hnsw/hnsw.rs:15:8 [INFO] [stderr] | [INFO] [stderr] 15 | fn new() -> Data { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new_with_vectors` [INFO] [stderr] --> src/hnsw/hnsw.rs:22:8 [INFO] [stderr] | [INFO] [stderr] 22 | fn new_with_vectors(demension: i32, val: &[f64]) -> Data { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `distance` [INFO] [stderr] --> src/hnsw/hnsw.rs:29:8 [INFO] [stderr] | [INFO] [stderr] 29 | fn distance(&self, data: &Data) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `new` [INFO] [stderr] --> src/hnsw/hnsw.rs:56:12 [INFO] [stderr] | [INFO] [stderr] 56 | pub fn new(demension: usize) -> HnswIndexer { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_random_level` [INFO] [stderr] --> src/hnsw/hnsw.rs:72:8 [INFO] [stderr] | [INFO] [stderr] 72 | fn get_random_level(&self) -> usize { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_neighbors_by_heuristic2` [INFO] [stderr] --> src/hnsw/hnsw.rs:89:8 [INFO] [stderr] | [INFO] [stderr] 89 | fn get_neighbors_by_heuristic2( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:135:8 [INFO] [stderr] | [INFO] [stderr] 135 | fn get_neighbor(&self, id: usize, level: usize) -> &Vec { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `clear_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:142:8 [INFO] [stderr] | [INFO] [stderr] 142 | fn clear_neighbor(&mut self, id: usize, level: usize) { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `set_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:150:8 [INFO] [stderr] | [INFO] [stderr] 150 | fn set_neighbor(&mut self, id: usize, level: usize, pos: usize, neighbor_id: usize) { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `push_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:158:8 [INFO] [stderr] | [INFO] [stderr] 158 | fn push_neighbor(&mut self, id: usize, level: usize, neighbor_id: usize) { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_level` [INFO] [stderr] --> src/hnsw/hnsw.rs:166:8 [INFO] [stderr] | [INFO] [stderr] 166 | fn get_level(&self, id: usize) -> usize { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `connect_neighbor` [INFO] [stderr] --> src/hnsw/hnsw.rs:170:8 [INFO] [stderr] | [INFO] [stderr] 170 | fn connect_neighbor( [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `delete_id` [INFO] [stderr] --> src/hnsw/hnsw.rs:272:12 [INFO] [stderr] | [INFO] [stderr] 272 | pub fn delete_id(&mut self, id: usize) -> Result<(), &'static str> { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `is_deleted` [INFO] [stderr] --> src/hnsw/hnsw.rs:283:12 [INFO] [stderr] | [INFO] [stderr] 283 | pub fn is_deleted(&self, id: usize) -> bool { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_data` [INFO] [stderr] --> src/hnsw/hnsw.rs:287:12 [INFO] [stderr] | [INFO] [stderr] 287 | pub fn get_data(&self, id: usize) -> &Vec { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_vec` [INFO] [stderr] --> src/hnsw/hnsw.rs:291:12 [INFO] [stderr] | [INFO] [stderr] 291 | pub fn get_distance_from_vec(&self, x: &Vec, y: &Vec) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `get_distance_from_id` [INFO] [stderr] --> src/hnsw/hnsw.rs:295:12 [INFO] [stderr] | [INFO] [stderr] 295 | pub fn get_distance_from_id(&self, x: usize, y: usize) -> f64 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_laryer` [INFO] [stderr] --> src/hnsw/hnsw.rs:300:12 [INFO] [stderr] | [INFO] [stderr] 300 | pub fn search_laryer( [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_laryer_default` [INFO] [stderr] --> src/hnsw/hnsw.rs:360:12 [INFO] [stderr] | [INFO] [stderr] 360 | pub fn search_laryer_default( [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `search_knn` [INFO] [stderr] --> src/hnsw/hnsw.rs:369:12 [INFO] [stderr] | [INFO] [stderr] 369 | pub fn search_knn( [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `init_item` [INFO] [stderr] --> src/hnsw/hnsw.rs:412:12 [INFO] [stderr] | [INFO] [stderr] 412 | pub fn init_item(&mut self, item: i32, data: &[f64]) -> usize { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function is never used: `add_item` [INFO] [stderr] --> src/hnsw/hnsw.rs:430:12 [INFO] [stderr] | [INFO] [stderr] 430 | pub fn add_item(&mut self, item: i32, data: &[f64]) -> Result { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `test_annoy` [INFO] [stderr] --> src/main.rs:9:4 [INFO] [stderr] | [INFO] [stderr] 9 | fn test_annoy() { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `test_hnsw` [INFO] [stderr] --> src/main.rs:51:4 [INFO] [stderr] | [INFO] [stderr] 51 | fn test_hnsw() { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/main.rs:38:9 [INFO] [stderr] | [INFO] [stderr] 38 | aix.add_item(i as i32, &f, angular); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_must_use)]` on by default [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/main.rs:55:9 [INFO] [stderr] | [INFO] [stderr] 55 | indexer.add_item(i, &f); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: structure field `_K` should have a snake case name [INFO] [stderr] --> src/annoy/annoy.rs:363:5 [INFO] [stderr] | [INFO] [stderr] 363 | _K: i32, // max number of n_descendants to fit into leaf [INFO] [stderr] | ^^ help: convert the identifier to snake case (notice the capitalization): `_k` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` on by default [INFO] [stderr] [INFO] [stderr] warning: constant `attempt` should have an upper case name [INFO] [stderr] --> src/annoy/annoy.rs:607:15 [INFO] [stderr] | [INFO] [stderr] 607 | const attempt: usize = 3; [INFO] [stderr] | ^^^^^^^ help: convert the identifier to upper case: `ATTEMPT` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/annoy/annoy.rs:611:13 [INFO] [stderr] | [INFO] [stderr] 611 | self.distance.create_split(children.as_slice(), &mut m); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/hnsw/hnsw.rs:182:9 [INFO] [stderr] | [INFO] [stderr] 182 | self.get_neighbors_by_heuristic2(top_candidates, n_neigh); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: unused `std::result::Result` that must be used [INFO] [stderr] --> src/hnsw/hnsw.rs:253:21 [INFO] [stderr] | [INFO] [stderr] 253 | self.get_neighbors_by_heuristic2(&mut candidates, n_neigh); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] [INFO] [stderr] warning: 93 warnings emitted [INFO] [stderr] [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 0.17s [INFO] [stderr] Running /opt/rustwide/target/debug/deps/fastann-d43cf439fd79e1aa [INFO] [stdout] [INFO] [stdout] running 1 test [INFO] [stdout] test common::node::node_test ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [INFO] [stdout] [INFO] [stderr] Running /opt/rustwide/target/debug/deps/fastann-eacbc5469dd148c8 [INFO] [stdout] [INFO] [stdout] running 1 test [INFO] [stdout] test common::node::node_test ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [INFO] [stdout] [INFO] [stderr] Doc-tests fastann [INFO] [stderr] warning: unnecessary parentheses around `while` condition [INFO] [stderr] --> /opt/rustwide/workdir/src/hnsw/hnsw.rs:75:15 [INFO] [stderr] | [INFO] [stderr] 75 | while (ret < self._max_level) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_parens)]` on by default [INFO] [stderr] [INFO] [stderr] warning: 1 warning emitted [INFO] [stderr] [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "f5f609c2b706e6c990b1dfbfe30c78e3bd8fff175abf82a86c736bb1f2180947", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f5f609c2b706e6c990b1dfbfe30c78e3bd8fff175abf82a86c736bb1f2180947", kill_on_drop: false }` [INFO] [stdout] f5f609c2b706e6c990b1dfbfe30c78e3bd8fff175abf82a86c736bb1f2180947