mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
redundant_closure
This commit is contained in:
parent
3cf1358eb8
commit
5a62a0db46
4 changed files with 6 additions and 10 deletions
|
@ -308,7 +308,7 @@ impl SourceToDefCtx<'_, '_> {
|
|||
pub(super) fn type_param_to_def(&mut self, src: InFile<ast::TypeParam>) -> Option<TypeParamId> {
|
||||
let container: ChildContainer = self.find_generic_param_container(src.syntax())?.into();
|
||||
let dyn_map = self.cache_for(container, src.file_id);
|
||||
dyn_map[keys::TYPE_PARAM].get(&src.value).copied().map(|it| TypeParamId::from_unchecked(it))
|
||||
dyn_map[keys::TYPE_PARAM].get(&src.value).copied().map(TypeParamId::from_unchecked)
|
||||
}
|
||||
|
||||
pub(super) fn lifetime_param_to_def(
|
||||
|
@ -326,10 +326,7 @@ impl SourceToDefCtx<'_, '_> {
|
|||
) -> Option<ConstParamId> {
|
||||
let container: ChildContainer = self.find_generic_param_container(src.syntax())?.into();
|
||||
let dyn_map = self.cache_for(container, src.file_id);
|
||||
dyn_map[keys::CONST_PARAM]
|
||||
.get(&src.value)
|
||||
.copied()
|
||||
.map(|it| ConstParamId::from_unchecked(it))
|
||||
dyn_map[keys::CONST_PARAM].get(&src.value).copied().map(ConstParamId::from_unchecked)
|
||||
}
|
||||
|
||||
pub(super) fn generic_param_to_def(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue