From c95b000b7b57ba9a435f1e372284c74d56bb4894 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 12 Oct 2019 22:51:25 +0100 Subject: [PATCH] annotations_mut, value_mut for PlainValue --- implementations/rust/src/value/value.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/implementations/rust/src/value/value.rs b/implementations/rust/src/value/value.rs index f2277f0..3013d7a 100644 --- a/implementations/rust/src/value/value.rs +++ b/implementations/rust/src/value/value.rs @@ -629,6 +629,16 @@ impl Ord for AnnotatedValue { #[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct PlainValue(AnnotatedValue); +impl PlainValue { + pub fn annotations_mut(&mut self) -> &mut Vec { + &mut (self.0).0 + } + + pub fn value_mut(&mut self) -> &mut Value { + &mut (self.0).1 + } +} + impl NestedValue for PlainValue { type BoxType = Box;