annotations_mut, value_mut for PlainValue

This commit is contained in:
Tony Garnock-Jones 2019-10-12 22:51:25 +01:00
parent 9611c1f977
commit c95b000b7b
1 changed files with 10 additions and 0 deletions

View File

@ -629,6 +629,16 @@ impl<N: NestedValue> Ord for AnnotatedValue<N> {
#[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PlainValue(AnnotatedValue<PlainValue>);
impl PlainValue {
pub fn annotations_mut(&mut self) -> &mut Vec<Self> {
&mut (self.0).0
}
pub fn value_mut(&mut self) -> &mut Value<Self> {
&mut (self.0).1
}
}
impl NestedValue for PlainValue {
type BoxType = Box<Self>;