Add array concatenation

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-13 07:42:29 +01:00
parent d41cd57847
commit b2a97c56db

View file

@ -5,6 +5,8 @@ use std::collections::BTreeMap;
use displaydoc::Display; use displaydoc::Display;
use thiserror::Error; use thiserror::Error;
use crate::Nomo;
#[derive(Clone)] #[derive(Clone)]
pub enum NomoValue { pub enum NomoValue {
String { String {
@ -122,6 +124,11 @@ impl NomoValue {
value: Cow::Owned(format!("{rstr}{lstr}")), value: Cow::Owned(format!("{rstr}{lstr}")),
}) })
} }
(NomoValue::Array { value: lval }, NomoValue::Array { value: rval }) => {
Some(NomoValue::Array {
value: Vec::from_iter(lval.iter().chain(rval.iter()).cloned()),
})
}
_ => None, _ => None,
} }
} }