Skip to content

Commit

Permalink
clippy --fix + cargo fmt pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
darnuria committed Sep 2, 2022
1 parent 234f68d commit cbe8c0a
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/code_checkers/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ fn to_correct_name(s: &str) -> String {
}

fn check_md_doc_path(p: &Path, md_line: &str, ty_line: &str) -> bool {
let parts = md_line.split("/").collect::<Vec<_>>();
let parts = md_line.split('/').collect::<Vec<_>>();
if let Some(md_name) = parts.last().and_then(|n| n.split(".md").next()) {
if let Some(name) = ty_line
.split_whitespace()
.filter(|s| !s.is_empty())
.skip(2)
.next()
{
if let Some(name) = ty_line.split_whitespace().filter(|s| !s.is_empty()).nth(2) {
if let Some(name) = name
.split('<')
.next()
Expand All @@ -54,7 +49,7 @@ fn check_md_doc_path(p: &Path, md_line: &str, ty_line: &str) -> bool {
} else {
show_error(p, &format!("Cannot extract md name from `{}`", md_line));
}
return false;
false
}

fn check_doc_comments_before(p: &Path, lines: &[&str], start: usize) -> bool {
Expand Down

0 comments on commit cbe8c0a

Please sign in to comment.