Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ensure desc sort and cleanup unused imports

KCaverlyea278b5b12be
diff --git a/crates/semantic_index/src/db.rs b/crates/semantic_index/src/db.rs
index 3558bf6b0a0..caa70a4cfaa 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<T: Ord>(data: &[T]) -> Vec<usize> {
let mut indices = (0..data.len()).collect::<Vec<_>>();
indices.sort_by_key(|&i| &data[i]);
+ indices.reverse();
indices
}