mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-28 12:01:06 -05:00
style: Address clippy
This commit is contained in:
parent
8a8007d353
commit
dc327e0d51
3 changed files with 5 additions and 8 deletions
|
@ -9,7 +9,7 @@ fn parse_dict(raw: &str) -> impl Iterator<Item = (&str, Vec<&str>)> {
|
||||||
let corrections = parts
|
let corrections = parts
|
||||||
.next()
|
.next()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.split(",")
|
.split(',')
|
||||||
.filter_map(|c| {
|
.filter_map(|c| {
|
||||||
let c = c.trim();
|
let c = c.trim();
|
||||||
if c.is_empty() {
|
if c.is_empty() {
|
||||||
|
@ -49,7 +49,6 @@ fn generate<W: std::io::Write>(file: &mut W) {
|
||||||
let codegenned = builder.build();
|
let codegenned = builder.build();
|
||||||
writeln!(file, "{}", codegenned).unwrap();
|
writeln!(file, "{}", codegenned).unwrap();
|
||||||
writeln!(file, ";").unwrap();
|
writeln!(file, ";").unwrap();
|
||||||
writeln!(file, "").unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, StructOpt)]
|
#[derive(Debug, StructOpt)]
|
||||||
|
|
|
@ -31,7 +31,7 @@ fn parse_dict(
|
||||||
current = &mut american;
|
current = &mut american;
|
||||||
} else if line.contains("DictBritish") {
|
} else if line.contains("DictBritish") {
|
||||||
current = &mut british;
|
current = &mut british;
|
||||||
} else if line.contains("}") {
|
} else if line.contains('}') {
|
||||||
current = &mut bad;
|
current = &mut bad;
|
||||||
} else {
|
} else {
|
||||||
let captures = mapping.captures(line);
|
let captures = mapping.captures(line);
|
||||||
|
@ -78,7 +78,7 @@ fn generate<W: std::io::Write>(file: &mut W) {
|
||||||
let codegenned = builder.build();
|
let codegenned = builder.build();
|
||||||
writeln!(file, "{}", codegenned).unwrap();
|
writeln!(file, "{}", codegenned).unwrap();
|
||||||
writeln!(file, ";").unwrap();
|
writeln!(file, ";").unwrap();
|
||||||
writeln!(file, "").unwrap();
|
writeln!(file).unwrap();
|
||||||
|
|
||||||
writeln!(
|
writeln!(
|
||||||
file,
|
file,
|
||||||
|
@ -94,7 +94,7 @@ fn generate<W: std::io::Write>(file: &mut W) {
|
||||||
let codegenned = builder.build();
|
let codegenned = builder.build();
|
||||||
writeln!(file, "{}", codegenned).unwrap();
|
writeln!(file, "{}", codegenned).unwrap();
|
||||||
writeln!(file, ";").unwrap();
|
writeln!(file, ";").unwrap();
|
||||||
writeln!(file, "").unwrap();
|
writeln!(file).unwrap();
|
||||||
|
|
||||||
writeln!(
|
writeln!(
|
||||||
file,
|
file,
|
||||||
|
@ -110,7 +110,6 @@ fn generate<W: std::io::Write>(file: &mut W) {
|
||||||
let codegenned = builder.build();
|
let codegenned = builder.build();
|
||||||
writeln!(file, "{}", codegenned).unwrap();
|
writeln!(file, "{}", codegenned).unwrap();
|
||||||
writeln!(file, ";").unwrap();
|
writeln!(file, ";").unwrap();
|
||||||
writeln!(file, "").unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, StructOpt)]
|
#[derive(Debug, StructOpt)]
|
||||||
|
|
|
@ -9,7 +9,7 @@ fn parse_dict(raw: &str) -> impl Iterator<Item = (&str, Vec<&str>)> {
|
||||||
let corrections = parts
|
let corrections = parts
|
||||||
.next()
|
.next()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.split(",")
|
.split(',')
|
||||||
.filter_map(|c| {
|
.filter_map(|c| {
|
||||||
let c = c.trim();
|
let c = c.trim();
|
||||||
if c.is_empty() {
|
if c.is_empty() {
|
||||||
|
@ -49,7 +49,6 @@ fn generate<W: std::io::Write>(file: &mut W) {
|
||||||
let codegenned = builder.build();
|
let codegenned = builder.build();
|
||||||
writeln!(file, "{}", codegenned).unwrap();
|
writeln!(file, "{}", codegenned).unwrap();
|
||||||
writeln!(file, ";").unwrap();
|
writeln!(file, ";").unwrap();
|
||||||
writeln!(file, "").unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, StructOpt)]
|
#[derive(Debug, StructOpt)]
|
||||||
|
|
Loading…
Reference in a new issue