summaryrefslogtreecommitdiff
path: root/core/error.rs
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-11-28 06:47:35 +1100
committerGitHub <noreply@github.com>2020-11-28 06:47:35 +1100
commite2858d0bbb13dae202e7da9ee7bbb81916349d1e (patch)
treec47084e73a9d4c7a852546374069b1aa176c3265 /core/error.rs
parent40bf26b37d82c7a85c3d6a54947fc441eb5e6946 (diff)
chore: clippy future cleanups (#8514)
Diffstat (limited to 'core/error.rs')
-rw-r--r--core/error.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/error.rs b/core/error.rs
index 331feba20..1d31df5ed 100644
--- a/core/error.rs
+++ b/core/error.rs
@@ -186,11 +186,11 @@ impl JsError {
.and_then(|m| m.to_string(scope))
.map(|s| s.to_rust_string_lossy(scope))
.unwrap_or_else(|| "".to_string());
- let message = if name != "" && message_prop != "" {
+ let message = if !name.is_empty() && !message_prop.is_empty() {
format!("Uncaught {}: {}", name, message_prop)
- } else if name != "" {
+ } else if !name.is_empty() {
format!("Uncaught {}", name)
- } else if message_prop != "" {
+ } else if !message_prop.is_empty() {
format!("Uncaught {}", message_prop)
} else {
"Uncaught".to_string()