diff --git a/src-tauri/src/enhance/seq.rs b/src-tauri/src/enhance/seq.rs index 1aa1785..c253b1e 100644 --- a/src-tauri/src/enhance/seq.rs +++ b/src-tauri/src/enhance/seq.rs @@ -16,14 +16,7 @@ pub fn use_seq(seq_map: SeqMap, config: Mapping, name: &str) -> Mapping { val.as_sequence().unwrap_or(&Sequence::default()).clone() }); let mut seq = origin_seq.clone(); - prepend.reverse(); - for item in prepend { - seq.insert(0, item); - } - for item in append { - seq.push(item); - } let mut delete_names = Vec::new(); for item in delete { let item = item.clone(); @@ -47,6 +40,15 @@ pub fn use_seq(seq_map: SeqMap, config: Mapping, name: &str) -> Mapping { } }); + prepend.reverse(); + for item in prepend { + seq.insert(0, item); + } + + for item in append { + seq.push(item); + } + let mut config = config.clone(); config.insert(Value::from(name), Value::from(seq)); return config;