mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 04:48:13 +00:00
Remove limit crate in favor usize
This commit is contained in:
parent
e865b249e6
commit
0b2e8166a1
17 changed files with 23 additions and 131 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue