From c360a6158e3fdc8f923b44d29984b782b4cf80c8 Mon Sep 17 00:00:00 2001 From: "daniel.eades" Date: Thu, 16 Nov 2023 17:39:53 +0000 Subject: [PATCH] prefer 'is_empty' to comparison with empty str --- cosmic-applet-bluetooth/src/bluetooth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmic-applet-bluetooth/src/bluetooth.rs b/cosmic-applet-bluetooth/src/bluetooth.rs index 06f63882..7ec52923 100644 --- a/cosmic-applet-bluetooth/src/bluetooth.rs +++ b/cosmic-applet-bluetooth/src/bluetooth.rs @@ -209,7 +209,7 @@ impl BluerDevice { .await .unwrap_or_default() .unwrap_or_else(|| device.address().to_string()); - if name == "" { + if name.is_empty() { name = device.address().to_string(); }; let is_paired = device.is_paired().await.unwrap_or_default();