Skip to content

Commit

Permalink
clippy --fix pass (#834)
Browse files Browse the repository at this point in the history
Fix clippy lint error
  • Loading branch information
darnuria authored Sep 2, 2022
1 parent 234f68d commit 8dd33dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/linux/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ fn get_uid_and_gid(file_path: &Path) -> Option<(uid_t, gid_t)> {
}
}

let status_data = get_all_data(&file_path, 16_385).ok()?;
let status_data = get_all_data(file_path, 16_385).ok()?;

// We're only interested in the lines starting with Uid: and Gid:
// here. From these lines, we're looking at the second entry to get
Expand Down
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 8dd33dd

Please sign in to comment.