Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a1d9e45

Browse files
max-hellerVeykril
andcommitted
Apply suggestions from code review
Co-authored-by: Lukas Wirth <[email protected]>
1 parent 0c21d85 commit a1d9e45

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

crates/ide-completion/src/context.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,15 @@ pub(crate) enum TypeLocation {
169169

170170
impl TypeLocation {
171171
pub(crate) fn complete_lifetimes(&self) -> bool {
172-
match self {
173-
TypeLocation::GenericArg(Some((_, _, Some(param)))) => {
174-
matches!(param, ast::GenericParam::LifetimeParam(_))
175-
}
176-
_ => false,
177-
}
172+
matches!(
173+
self,
174+
TypeLocation::GenericArg(Some((_, _, Some(ast::GenericParam::LifetimeParam(_)))))
175+
)
178176
}
179177

180178
pub(crate) fn complete_consts(&self) -> bool {
181179
match self {
182-
TypeLocation::GenericArg(Some((_, _, Some(param)))) => {
183-
matches!(param, ast::GenericParam::ConstParam(_))
184-
}
180+
TypeLocation::GenericArg(Some((_, _, Some(ast::GenericParam::ConstParam(_))))) => true,
185181
TypeLocation::AssocConstEq => true,
186182
_ => false,
187183
}

0 commit comments

Comments
 (0)