Skip to content

Commit 4f278a1

Browse files
committed
lint: fix clippy
1 parent 5beecbe commit 4f278a1

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/app/hdd.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ fn reclassify_virtual_hdd<Fs: FsApi>(kind: DiskKind, disk_name: &str) -> DiskKin
8989
if kind != DiskKind::HDD {
9090
return kind;
9191
}
92-
if let Some(block_dev) = extract_block_device_name::<Fs>(disk_name) {
93-
if is_virtual_block_device::<Fs>(&block_dev) {
94-
return VIRTUAL_DISK_KIND;
95-
}
92+
if let Some(block_dev) = extract_block_device_name::<Fs>(disk_name)
93+
&& is_virtual_block_device::<Fs>(&block_dev)
94+
{
95+
return VIRTUAL_DISK_KIND;
9696
}
9797
DiskKind::HDD
9898
}

src/man_page.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ fn render_synopsis_option(out: &mut String, arg: &Arg) {
114114
if let Some(long) = arg.get_long() {
115115
write!(out, "\\fB\\-\\-{}\\fR", roff_escape(long)).unwrap();
116116
}
117-
if arg.get_action().takes_values() {
118-
if let Some(value_names) = arg.get_value_names() {
119-
for name in value_names {
120-
write!(out, " \\fI{}\\fR", roff_escape(name)).unwrap();
121-
}
117+
if arg.get_action().takes_values()
118+
&& let Some(value_names) = arg.get_value_names()
119+
{
120+
for name in value_names {
121+
write!(out, " \\fI{}\\fR", roff_escape(name)).unwrap();
122122
}
123123
}
124124
out.push(']');

0 commit comments

Comments
 (0)