Skip to content

Commit f3dc7ae

Browse files
committed
Fixed up the documentation for a couple functions
1 parent 01c75e4 commit f3dc7ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/matches/single_match.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ fn check_opt_like<'a>(
147147
}
148148
}
149149

150+
/// Returns `true` if all of the types in the pattern are candidate enums
150151
fn pat_in_candidate_enum<'a>(cx: &LateContext<'a>, ty: Ty<'a>, pat: &Pat<'_>) -> bool {
151152
let mut paths_and_types = Vec::new();
152153
collect_pat_paths(&mut paths_and_types, cx, pat, ty);
@@ -166,7 +167,7 @@ fn in_candidate_enum<'a>(cx: &LateContext<'a>, ty: Ty<'_>) -> bool {
166167
false
167168
}
168169

169-
/// Collects paths and their types from the given patterns
170+
/// Collects types from the given pattern
170171
fn collect_pat_paths<'a>(acc: &mut Vec<Ty<'a>>, cx: &LateContext<'a>, pat: &Pat<'_>, ty: Ty<'a>) {
171172
match pat.kind {
172173
PatKind::Tuple(inner, _) => inner.iter().for_each(|p| {

0 commit comments

Comments
 (0)