summaryrefslogtreecommitdiffstats
path: root/sq
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 21:38:09 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:59 +0200
commit792dfa2105e0a75a27ebffdc1cf0ab8873deaac1 (patch)
treef4770d8297c001ef624c7e716a6c45e8c5ea6b63 /sq
parent8b49cc933cbeda3e34420679288c4985abdc6059 (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 'sq')
-rw-r--r--sq/build.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/sq/build.rs b/sq/build.rs
index 49d55740..07de15e0 100644
--- a/sq/build.rs
+++ b/sq/build.rs
@@ -68,7 +68,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 {
@@ -79,7 +79,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
@@ -87,7 +87,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
}