summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamed Abdelnour <mohamed.k.abdelnour@gmail.com>2021-05-21 14:19:15 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2021-05-27 12:05:07 +0200
commit304ee1489c360f6d852fbf4954a401ab887921c6 (patch)
treeab4408de0821b78aeba7096bb6d260369cf2f4ed
parent07d41792743d45c290945e87952ad6c39f950b79 (diff)
Use `!theme.is_empty()`
-rw-r--r--src/assets.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/assets.rs b/src/assets.rs
index bac0c430..88509788 100644
--- a/src/assets.rs
+++ b/src/assets.rs
@@ -201,7 +201,7 @@ impl HighlightingAssets {
bat_warning!("Theme '{}' is deprecated, using 'ansi' instead.", theme);
return self.get_theme("ansi");
}
- if theme != "" {
+ if !theme.is_empty() {
bat_warning!("Unknown theme '{}', using default.", theme)
}
&self.theme_set.themes[self.fallback_theme.unwrap_or_else(|| Self::default_theme())]