summaryrefslogtreecommitdiffstats
path: root/src/cmd/sql.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-12-22 02:59:15 -0500
committerJesse Luehrs <doy@tozt.net>2018-12-22 02:59:15 -0500
commit144a829d82db142d1f6ae76adf49dddd77751428 (patch)
treec01b7833107d3eb916a2e530e15042673dbf62aa /src/cmd/sql.rs
parentc22141ea46b406003eb889a8408d9b87e6b488fa (diff)
downloadlastfm-query-144a829d82db142d1f6ae76adf49dddd77751428.tar.gz
lastfm-query-144a829d82db142d1f6ae76adf49dddd77751428.zip
cargo fmt
Diffstat (limited to 'src/cmd/sql.rs')
-rw-r--r--src/cmd/sql.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cmd/sql.rs b/src/cmd/sql.rs
index 81fdaef..404c97e 100644
--- a/src/cmd/sql.rs
+++ b/src/cmd/sql.rs
@@ -14,12 +14,12 @@ pub fn subcommand<'a, 'b>() -> clap::App<'a, 'b> {
.arg(
clap::Arg::with_name("query")
.required(true)
- .help("query to run")
+ .help("query to run"),
)
.arg(
clap::Arg::with_name("tsv")
.long("tsv")
- .help("format output as tsv")
+ .help("format output as tsv"),
)
}
@@ -47,8 +47,7 @@ impl super::Command for Command {
if self.tsv {
print_tsv(&rows);
- }
- else {
+ } else {
print_table(&cols, &rows);
}
@@ -100,7 +99,7 @@ fn print_row(widths: &[usize], row: &[String]) {
let fixed_width_row: Vec<String> = row
.iter()
.zip(widths.iter())
- .map(|(s, width)| format!("{:width$}", s, width=width))
+ .map(|(s, width)| format!("{:width$}", s, width = width))
.collect();
println!("{}", &fixed_width_row.join(" | "));
}