Add array concatenation
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
d41cd57847
commit
b2a97c56db
1 changed files with 7 additions and 0 deletions
|
|
@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue