mirror of
https://codeberg.org/icewind/nextcloud-config-parser.git
synced 2026-06-03 16:44:09 +02:00
fix formatting
This commit is contained in:
parent
172f328713
commit
f694ccb408
1 changed files with 9 additions and 5 deletions
|
|
@ -342,11 +342,15 @@ fn parse_redis_options(parsed: &Value, key: &str) -> RedisConfig {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
let db = redis_options["dbindex"].clone().into_int().or_else(|| {
|
let db = redis_options["dbindex"]
|
||||||
|
.clone()
|
||||||
|
.into_int()
|
||||||
|
.or_else(|| {
|
||||||
redis_options["dbindex"]
|
redis_options["dbindex"]
|
||||||
.as_str()
|
.as_str()
|
||||||
.and_then(|i| i64::from_str(i).ok())
|
.and_then(|i| i64::from_str(i).ok())
|
||||||
}).unwrap_or(0);
|
})
|
||||||
|
.unwrap_or(0);
|
||||||
let password = redis_options["password"]
|
let password = redis_options["password"]
|
||||||
.as_str()
|
.as_str()
|
||||||
.filter(|pass| !pass.is_empty())
|
.filter(|pass| !pass.is_empty())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue