From dc327e0d5100f5bc16e1798b86fdf5b4a148cd4f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 28 Oct 2019 16:25:41 -0600 Subject: [PATCH] style: Address clippy --- dict/codespell/codegen/src/main.rs | 3 +-- dict/misspell/codegen/src/main.rs | 7 +++---- dict/wikipedia/codegen/src/main.rs | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dict/codespell/codegen/src/main.rs b/dict/codespell/codegen/src/main.rs index 0f7fed3..2f5a2fa 100644 --- a/dict/codespell/codegen/src/main.rs +++ b/dict/codespell/codegen/src/main.rs @@ -9,7 +9,7 @@ fn parse_dict(raw: &str) -> impl Iterator)> { let corrections = parts .next() .unwrap() - .split(",") + .split(',') .filter_map(|c| { let c = c.trim(); if c.is_empty() { @@ -49,7 +49,6 @@ fn generate(file: &mut W) { let codegenned = builder.build(); writeln!(file, "{}", codegenned).unwrap(); writeln!(file, ";").unwrap(); - writeln!(file, "").unwrap(); } #[derive(Debug, StructOpt)] diff --git a/dict/misspell/codegen/src/main.rs b/dict/misspell/codegen/src/main.rs index 6c3807c..20a6788 100644 --- a/dict/misspell/codegen/src/main.rs +++ b/dict/misspell/codegen/src/main.rs @@ -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); @@ -78,7 +78,7 @@ fn generate(file: &mut W) { let codegenned = builder.build(); writeln!(file, "{}", codegenned).unwrap(); writeln!(file, ";").unwrap(); - writeln!(file, "").unwrap(); + writeln!(file).unwrap(); writeln!( file, @@ -94,7 +94,7 @@ fn generate(file: &mut W) { let codegenned = builder.build(); writeln!(file, "{}", codegenned).unwrap(); writeln!(file, ";").unwrap(); - writeln!(file, "").unwrap(); + writeln!(file).unwrap(); writeln!( file, @@ -110,7 +110,6 @@ fn generate(file: &mut W) { let codegenned = builder.build(); writeln!(file, "{}", codegenned).unwrap(); writeln!(file, ";").unwrap(); - writeln!(file, "").unwrap(); } #[derive(Debug, StructOpt)] diff --git a/dict/wikipedia/codegen/src/main.rs b/dict/wikipedia/codegen/src/main.rs index 0f7fed3..2f5a2fa 100644 --- a/dict/wikipedia/codegen/src/main.rs +++ b/dict/wikipedia/codegen/src/main.rs @@ -9,7 +9,7 @@ fn parse_dict(raw: &str) -> impl Iterator)> { let corrections = parts .next() .unwrap() - .split(",") + .split(',') .filter_map(|c| { let c = c.trim(); if c.is_empty() { @@ -49,7 +49,6 @@ fn generate(file: &mut W) { let codegenned = builder.build(); writeln!(file, "{}", codegenned).unwrap(); writeln!(file, ";").unwrap(); - writeln!(file, "").unwrap(); } #[derive(Debug, StructOpt)]