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 a90970a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ fn interpret_input(input: &str, sys: &mut System) -> bool {
let pid = Pid::from_str(tmp[1]).unwrap();
let signal = i32::from_str(tmp[2]).unwrap();

if signal < 1 || signal > 31 {
if !(1..=31).contains(&signal) {
writeln!(
&mut io::stdout(),
"Signal must be between 0 and 32 ! See the signals list with the \
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 a90970a

Please sign in to comment.