docs: fix the complexity claim on Database::remove (#1344)

Co-authored-by: Ajeet D'Souza <98ajeet@gmail.com>
This commit is contained in:
ump45nose
2026-10-24 05:25:42 +05:30
committed by GitHub
co-authored by Ajeet D'Souza
parent 0601783346
commit a053d91121
+1 -1
View File
@@ -128,7 +128,7 @@ impl Database {
}
/// Removes the directory with `path` from the store. This does not preserve
/// ordering, but is O(1).
/// ordering.
pub fn remove(&mut self, path: impl AsRef<str>) -> bool {
match self.dirs().iter().position(|dir| dir.path == path.as_ref()) {
Some(idx) => {