From a3657fef9f79a300eb97c62325d3ee1f4493bce3 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Thu, 2 Jan 2025 10:46:36 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Retoques=20en=20el=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagetop/src/app.rs | 2 +- pagetop/src/locale.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)), };