mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 21:41:04 +00:00
Use strip_prefix() instead of range access
This commit is contained in:
parent
a236f33269
commit
bbd415c392
1 changed files with 2 additions and 2 deletions
|
@ -164,8 +164,8 @@ impl Default for LogoConfig {
|
||||||
};
|
};
|
||||||
let mut custom_icons = env::vars()
|
let mut custom_icons = env::vars()
|
||||||
.filter_map(|(var, val)| {
|
.filter_map(|(var, val)| {
|
||||||
if var.starts_with("PLUME_LOGO_") {
|
if let Some(size) = var.strip_prefix("PLUME_LOGO_") {
|
||||||
Some((var[11..].to_owned(), val))
|
Some((size.to_owned(), val))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue