Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clippy --fix pass #834

Merged
merged 2 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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