Skip to content

Commit

Permalink
style: Address clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Page committed Oct 28, 2019
1 parent 8a8007d commit dc327e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions dict/codespell/codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn parse_dict(raw: &str) -> impl Iterator<Item = (&str, Vec<&str>)> {
let corrections = parts
.next()
.unwrap()
.split(",")
.split(',')
.filter_map(|c| {
let c = c.trim();
if c.is_empty() {
Expand Down Expand Up @@ -49,7 +49,6 @@ fn generate<W: std::io::Write>(file: &mut W) {
let codegenned = builder.build();
writeln!(file, "{}", codegenned).unwrap();
writeln!(file, ";").unwrap();
writeln!(file, "").unwrap();
}

#[derive(Debug, StructOpt)]
Expand Down
7 changes: 3 additions & 4 deletions dict/misspell/codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn parse_dict(
current = &mut american;
} else if line.contains("DictBritish") {
current = &mut british;
} else if line.contains("}") {
} else if line.contains('}') {
current = &mut bad;
} else {
let captures = mapping.captures(line);
Expand Down Expand Up @@ -78,7 +78,7 @@ fn generate<W: std::io::Write>(file: &mut W) {
let codegenned = builder.build();
writeln!(file, "{}", codegenned).unwrap();
writeln!(file, ";").unwrap();
writeln!(file, "").unwrap();
writeln!(file).unwrap();

writeln!(
file,
Expand All @@ -94,7 +94,7 @@ fn generate<W: std::io::Write>(file: &mut W) {
let codegenned = builder.build();
writeln!(file, "{}", codegenned).unwrap();
writeln!(file, ";").unwrap();
writeln!(file, "").unwrap();
writeln!(file).unwrap();

writeln!(
file,
Expand All @@ -110,7 +110,6 @@ fn generate<W: std::io::Write>(file: &mut W) {
let codegenned = builder.build();
writeln!(file, "{}", codegenned).unwrap();
writeln!(file, ";").unwrap();
writeln!(file, "").unwrap();
}

#[derive(Debug, StructOpt)]
Expand Down
3 changes: 1 addition & 2 deletions dict/wikipedia/codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn parse_dict(raw: &str) -> impl Iterator<Item = (&str, Vec<&str>)> {
let corrections = parts
.next()
.unwrap()
.split(",")
.split(',')
.filter_map(|c| {
let c = c.trim();
if c.is_empty() {
Expand Down Expand Up @@ -49,7 +49,6 @@ fn generate<W: std::io::Write>(file: &mut W) {
let codegenned = builder.build();
writeln!(file, "{}", codegenned).unwrap();
writeln!(file, ";").unwrap();
writeln!(file, "").unwrap();
}

#[derive(Debug, StructOpt)]
Expand Down

0 comments on commit dc327e0

Please sign in to comment.