Skip to content

Commit 46dea25

Browse files
committed
merge declaration of logo_lines with test on ascii_input
1 parent cbfe831 commit 46dea25

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Diff for: src/onefetch/info.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,11 @@ impl std::fmt::Display for Info {
270270
panic!("No image backend found")
271271
}
272272
} else {
273-
let mut logo_lines;
274-
275-
if let Some(custom_ascii) = &self.config.ascii_input {
276-
logo_lines = AsciiArt::new(custom_ascii, Vec::new(), !self.config.no_bold);
273+
let mut logo_lines = if let Some(custom_ascii) = &self.config.ascii_input {
274+
AsciiArt::new(custom_ascii, Vec::new(), !self.config.no_bold)
277275
} else {
278-
logo_lines = AsciiArt::new(self.get_ascii(), self.colors(), !self.config.no_bold);
279-
}
276+
AsciiArt::new(self.get_ascii(), self.colors(), !self.config.no_bold)
277+
};
280278

281279
loop {
282280
match (logo_lines.next(), info_lines.next()) {

0 commit comments

Comments
 (0)