Skip to content

Commit 28a1c13

Browse files
committed
fmt cli flags declaration
1 parent bff472f commit 28a1c13

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/onefetch/cli.rs

+13-16
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,13 @@ impl Cli {
147147
It is possible to pass a generated STRING by command substitution. \n\
148148
For example:\n \
149149
'--ascii-input \"$(fortune | cowsay -W 25)\"'")
150-
.validator(
151-
|t| {
152-
if t.is_empty() {
153-
Err(String::from("must not be empty"))
154-
} else {
155-
Ok(())
156-
}
157-
},
158-
),
150+
.validator(|t| {
151+
if t.is_empty() {
152+
Err(String::from("must not be empty"))
153+
} else {
154+
Ok(())
155+
}
156+
}),
159157
)
160158
.arg(
161159
Arg::with_name("true-color")
@@ -254,13 +252,12 @@ impl Cli {
254252
.takes_value(true)
255253
.default_value("3")
256254
.help("NUM of authors to be shown.")
257-
.validator(
258-
|t| {
259-
t.parse::<u32>()
260-
.map_err(|_t| "must be a number")
261-
.map(|_t|())
262-
.map_err(|e| e.to_string())
263-
})
255+
.validator(|t| {
256+
t.parse::<u32>()
257+
.map_err(|_t| "must be a number")
258+
.map(|_t|())
259+
.map_err(|e| e.to_string())
260+
})
264261
)
265262
.arg(
266263
Arg::with_name("exclude")

0 commit comments

Comments
 (0)