Fixed up the documentation for a couple functions
This commit is contained in:
parent
01c75e4b98
commit
f3dc7ae370
1 changed files with 2 additions and 1 deletions
|
|
@ -147,6 +147,7 @@ fn check_opt_like<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if all of the types in the pattern are candidate enums
|
||||
fn pat_in_candidate_enum<'a>(cx: &LateContext<'a>, ty: Ty<'a>, pat: &Pat<'_>) -> bool {
|
||||
let mut paths_and_types = Vec::new();
|
||||
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 {
|
|||
false
|
||||
}
|
||||
|
||||
/// Collects paths and their types from the given patterns
|
||||
/// Collects types from the given pattern
|
||||
fn collect_pat_paths<'a>(acc: &mut Vec<Ty<'a>>, cx: &LateContext<'a>, pat: &Pat<'_>, ty: Ty<'a>) {
|
||||
match pat.kind {
|
||||
PatKind::Tuple(inner, _) => inner.iter().for_each(|p| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue