mirror of
https://codeberg.org/icewind/nextcloud-config-parser.git
synced 2026-06-03 08:34:13 +02:00
updates
This commit is contained in:
parent
a8f4622c1a
commit
bb16d30aa2
6 changed files with 410 additions and 469 deletions
|
|
@ -5,7 +5,6 @@ use crate::{
|
|||
use crate::{RedisConfig, RedisConnectionAddr};
|
||||
use indexmap::IndexMap;
|
||||
use php_literal_parser::Value;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::DirEntry;
|
||||
use std::iter::once;
|
||||
use std::net::IpAddr;
|
||||
|
|
@ -73,10 +72,10 @@ fn parse_php(path: impl AsRef<Path>) -> Result<Value> {
|
|||
}
|
||||
|
||||
fn merge_configs(input: Vec<(PathBuf, Value)>) -> Result<Value> {
|
||||
let mut merged = HashMap::with_capacity(16);
|
||||
let mut merged = IndexMap::with_capacity(16);
|
||||
|
||||
for (path, config) in input {
|
||||
match config.into_hashmap() {
|
||||
match config.into_map() {
|
||||
Some(map) => {
|
||||
for (key, value) in map {
|
||||
merged.insert(key, value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue