prefer 'is_empty' to comparison with empty str
This commit is contained in:
parent
068560e921
commit
c360a6158e
1 changed files with 1 additions and 1 deletions
|
|
@ -209,7 +209,7 @@ impl BluerDevice {
|
||||||
.await
|
.await
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.unwrap_or_else(|| device.address().to_string());
|
.unwrap_or_else(|| device.address().to_string());
|
||||||
if name == "" {
|
if name.is_empty() {
|
||||||
name = device.address().to_string();
|
name = device.address().to_string();
|
||||||
};
|
};
|
||||||
let is_paired = device.is_paired().await.unwrap_or_default();
|
let is_paired = device.is_paired().await.unwrap_or_default();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue