Use variables directly inside format strings
Most systems should have an up to date Rust compiler by now, so we should be fine.
This commit is contained in:
@@ -218,7 +218,7 @@ impl View for Layout {
|
||||
// back button + title
|
||||
if !self.is_current_stack_empty() {
|
||||
printer.with_color(ColorStyle::title_secondary(), |printer| {
|
||||
printer.print((1, 0), &format!("< {}", screen_title));
|
||||
printer.print((1, 0), &format!("< {screen_title}"));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -255,10 +255,7 @@ impl View for Layout {
|
||||
|
||||
printer.with_color(style, |printer| {
|
||||
printer.print_hline((0, printer.size.y - cmdline_height), printer.size.x, " ");
|
||||
printer.print(
|
||||
(0, printer.size.y - cmdline_height),
|
||||
&format!("ERROR: {}", e),
|
||||
);
|
||||
printer.print((0, printer.size.y - cmdline_height), &format!("ERROR: {e}"));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ impl ViewWrapper for LibraryView {
|
||||
impl ViewExt for LibraryView {
|
||||
fn title(&self) -> String {
|
||||
if let Some(name) = &self.display_name {
|
||||
format!("Library of {}", name)
|
||||
format!("Library of {name}")
|
||||
} else {
|
||||
"Library".to_string()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user