Remove limit crate in favor usize

This commit is contained in:
Lukas Wirth 2025-02-20 18:58:42 +01:00
parent e865b249e6
commit 0b2e8166a1
17 changed files with 23 additions and 131 deletions

View file

@ -30,7 +30,6 @@ bitflags.workspace = true
# local deps
base-db.workspace = true
limit.workspace = true
parser.workspace = true
profile.workspace = true
stdx.workspace = true

View file

@ -357,7 +357,7 @@ fn path_applicable_imports(
let mod_path = mod_path(item)?;
Some(LocatedImport::new(mod_path, item, item))
})
.take(DEFAULT_QUERY_SEARCH_LIMIT.inner())
.take(DEFAULT_QUERY_SEARCH_LIMIT)
.collect()
}
// we have some unresolved qualifier that we search an import for
@ -383,7 +383,7 @@ fn path_applicable_imports(
qualifier_rest,
)
})
.take(DEFAULT_QUERY_SEARCH_LIMIT.inner())
.take(DEFAULT_QUERY_SEARCH_LIMIT)
.collect(),
}
}

View file

@ -6,7 +6,6 @@ use std::ops::ControlFlow;
use either::Either;
use hir::{import_map, Crate, ItemInNs, Module, Semantics};
use limit::Limit;
use crate::{
imports::import_assets::NameToImport,
@ -15,7 +14,7 @@ use crate::{
};
/// A value to use, when uncertain which limit to pick.
pub static DEFAULT_QUERY_SEARCH_LIMIT: Limit = Limit::new(100);
pub const DEFAULT_QUERY_SEARCH_LIMIT: usize = 100;
pub use import_map::AssocSearchMode;