diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-07 21:38:09 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-09 13:13:59 +0200 |
commit | 792dfa2105e0a75a27ebffdc1cf0ab8873deaac1 (patch) | |
tree | f4770d8297c001ef624c7e716a6c45e8c5ea6b63 /sqv/build.rs | |
parent | 8b49cc933cbeda3e34420679288c4985abdc6059 (diff) |
Lint: Use char for single characters.
- https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
- https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
Diffstat (limited to 'sqv/build.rs')
-rw-r--r-- | sqv/build.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sqv/build.rs b/sqv/build.rs index 5bcc35d5..921e71ff 100644 --- a/sqv/build.rs +++ b/sqv/build.rs @@ -65,7 +65,7 @@ fn dump_help(sink: &mut dyn io::Write, .unwrap_err().to_string(); writeln!(sink, "//! ```text")?; - for line in help.trim_end().split("\n").skip(1) { + for line in help.trim_end().split('\n').skip(1) { if line.is_empty() { writeln!(sink, "//!")?; } else { @@ -76,7 +76,7 @@ fn dump_help(sink: &mut dyn io::Write, // Recurse. let mut found_subcommands = false; - for subcmd in help.split("\n").filter_map(move |line| { + for subcmd in help.split('\n').filter_map(move |line| { if line == "SUBCOMMANDS:" { found_subcommands = true; None @@ -84,7 +84,7 @@ fn dump_help(sink: &mut dyn io::Write, if line.chars().nth(4).map(|c| ! c.is_ascii_whitespace()) .unwrap_or(false) { - line.trim_start().split(" ").next() + line.trim_start().split(' ').next() } else { None } |