fn resolve(&mut self, maybe_memo: Option<Value>) -> Option<Value> {
        match maybe_memo {
            Some(Value::MemoRef(id)) => {
                self.memo.get_mut(&id).map(|&mut (ref val, ref mut count)| {
                    // We can't remove it from the memo here, since we haven't
                    // decoded the whole stream yet and there may be further
                    // references to the value.
                    *count -= 1;
                    val.clone()
                })
            },
            other => other
        }
    }
// Resolve memo reference during stream decoding.
Resolve memo reference during stream decoding.
Resolve memo reference during stream decoding .
fn resolve(&mut self, maybe_memo: Option<Value>) -> Option<Value> {
        match maybe_memo {
            Some(Value::MemoRef(id)) => {
                self.memo.get_mut(&id).map(|&mut (ref val, ref mut count)| {
                    // We can't remove it from the memo here, since we haven't
                    // decoded the whole stream yet and there may be further
                    // references to the value.
                    *count -= 1;
                    val.clone()
                })
            },
            other => other
        }
    }
fn resolve ( & mut self , maybe_memo : Option < Value > ) -> Option < Value > { match maybe_memo { Some ( Value :: MemoRef ( id ) ) => { self . memo . get_mut ( & id ) . map ( | & mut ( ref val , ref mut count ) | { // We can't remove it from the memo here, since we haven't // decoded the whole stream yet and there may be further // references to the value. * count -= 1 ; val . clone ( ) } ) } , other => other } }
Resolve memo reference during stream decoding.
Resolve memo reference during stream decoding .
&mut self
maybe_memo
Option<Value>
&mut self
maybe_memo
Option<Value>