diff --git a/crates/semantic_index/src/db.rs b/crates/semantic_index/src/db.rs index 3558bf6b0a0335bf1d4bca0114d08edb9d835d7d..caa70a4cfaaa76cbfc6138f864a12f58acacea02 100644 --- a/crates/semantic_index/src/db.rs +++ b/crates/semantic_index/src/db.rs @@ -16,19 +16,19 @@ use rpc::proto::Timestamp; use rusqlite::params; use rusqlite::types::Value; use std::{ - cmp::Reverse, future::Future, ops::Range, path::{Path, PathBuf}, rc::Rc, sync::Arc, - time::{Instant, SystemTime}, + time::SystemTime, }; use util::TryFutureExt; pub fn argsort(data: &[T]) -> Vec { let mut indices = (0..data.len()).collect::>(); indices.sort_by_key(|&i| &data[i]); + indices.reverse(); indices }