walrs
pywal but if its Fast-Minimal-Simple
git clone https://git.pi66.xyz/walrs
About | Files | Commits | Refs | License
fix let-else syntax compatibility in environment detection
Author: pixel2175
Date: 2025-06-06 15:36
commit: 4054eba1
Stat
| M | src/wallpaper.rs | 5 | +3 | -2 |
Diff
diff --git a/src/wallpaper.rs b/src/wallpaper.rs
index cae0ce4..b0a9541 100644
--- a/src/wallpaper.rs
+++ b/src/wallpaper.rs
@@ -69,8 +69,8 @@ fn get_desktop_env() -> Option<String> {
// Check for other environment variables
for key in keys.iter() {
- if let Ok(val) = env::var(key)
- && !val.is_empty() {
+ if let Ok(val) = env::var(key) {
+ if !val.is_empty() {
if *key == "DESKTOP_STARTUP_ID" && val.contains("awesome") {
return Some("AWESOME".to_string());
}
@@ -83,6 +83,7 @@ fn get_desktop_env() -> Option<String> {
return Some(val);
}
}
+ }
...
Show all
Show less
diff --git a/src/wallpaper.rs b/src/wallpaper.rs
index cae0ce4..b0a9541 100644
--- a/src/wallpaper.rs
+++ b/src/wallpaper.rs
@@ -69,8 +69,8 @@ fn get_desktop_env() -> Option<String> {
// Check for other environment variables
for key in keys.iter() {
- if let Ok(val) = env::var(key)
- && !val.is_empty() {
+ if let Ok(val) = env::var(key) {
+ if !val.is_empty() {
if *key == "DESKTOP_STARTUP_ID" && val.contains("awesome") {
return Some("AWESOME".to_string());
}
@@ -83,6 +83,7 @@ fn get_desktop_env() -> Option<String> {
return Some(val);
}
}
+ }
...
diff --git a/src/wallpaper.rs b/src/wallpaper.rs
index cae0ce4..b0a9541 100644
--- a/src/wallpaper.rs
+++ b/src/wallpaper.rs
@@ -69,8 +69,8 @@ fn get_desktop_env() -> Option<String> {
// Check for other environment variables
for key in keys.iter() {
- if let Ok(val) = env::var(key)
- && !val.is_empty() {
+ if let Ok(val) = env::var(key) {
+ if !val.is_empty() {
if *key == "DESKTOP_STARTUP_ID" && val.contains("awesome") {
return Some("AWESOME".to_string());
}
@@ -83,6 +83,7 @@ fn get_desktop_env() -> Option<String> {
return Some(val);
}
}
+ }
}
None
}