diff --git a/pagetop/src/app.rs b/pagetop/src/app.rs index da2f67f6..2a1a1a95 100644 --- a/pagetop/src/app.rs +++ b/pagetop/src/app.rs @@ -66,7 +66,7 @@ impl Application { if global::SETTINGS.app.startup_banner.to_lowercase() != "off" { // Application name, formatted for the terminal width if necessary. - let mut app_ff = "".to_string(); + let mut app_ff = String::new(); let app_name = &global::SETTINGS.app.name; if let Some((Width(term_width), _)) = terminal_size() { if term_width >= 80 { diff --git a/pagetop/src/locale.rs b/pagetop/src/locale.rs index 7c8a9e3c..a20fef5e 100644 --- a/pagetop/src/locale.rs +++ b/pagetop/src/locale.rs @@ -273,7 +273,7 @@ impl L10n { impl fmt::Display for L10n { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let content = match &self.op { - L10nOp::None => "".to_string(), + L10nOp::None => String::new(), L10nOp::Text(text) => text.clone(), L10nOp::Translate(key) => self.get().unwrap_or_else(|| format!("No <{}>", key)), };