You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: merge.rs
    path of file: ./repos/clash-nyanpasu/backend/tauri/src/enhance
    
    the code of the file until where you have to start completion: use super::{use_filter, use_lowercase};
use serde_yaml::{Mapping, Sequence, Value};

const MERGE_FIELDS: [&str; 6] = [
    "prepend-rules",
    "append-rules",
    "prepend-proxies",
    "append-proxies",
    "prepend-prox
    
pub fn use_merge(merge: Mapping, mut config: Mapping) -> Mapping {
    // 直接覆盖原字段
    use_lowercase(merge.clone())
        .into_iter()
        .for_each(|(key, value)| {
            config.insert(key, value);
        });

    let merge_list = MERGE_FIELDS.iter().map(|s| s.to_string());
    let merge_list = merge_list.collect::<Vec<String>>();
    let merge = use_filter(merge, &merge_list, true);

    ["rules", "proxies", "proxy-groups"]
        .iter()
        .for_each(|key_str| {
            let key_val = Value::from(key_str.to_string());

            let mut list = Sequence::default();
            list = config.get(&key_val).map_or(list.clone(), |val| {
                val.as_sequence().map_or(list, |v| v.clone())
            });

            let pre_key = Value::from(format!("prepend-{key_str}"));
            let post_key = Value::from(format!("append-{key_str}"));

            if let Some(pre_val) = merge.get(&pre_key) {
                if pre_val.is_sequence() {
                    let mut pre_val = pre_val.as_sequence().unwrap().clone();
                    pre_val.extend(list);
                    list = pre_val;
                }
            }

            if let Some(post_val) = merge.get(&post_key) {
                if post_val.is_sequence() {
                    list.extend(post_val.as_sequence().unwrap().clone());
                }
            }

            config.insert(key_val, Value::from(list));
        });
    config
}