~tim/rust-ruby-wrap-data

4bc50a11c75c9142fb57c7b1561d1f476aa2de29 — Tim Morgan 2 years ago 87a1afb
Don't need a Box for this
1 files changed, 2 insertions(+), 2 deletions(-)

M src/lib.rs
M src/lib.rs => src/lib.rs +2 -2
@@ 10,7 10,7 @@ use std::mem;

#[derive(Debug)]
enum MyValue {
    Vec(Box<Vec<MyValue>>),
    Vec(Vec<MyValue>),
    Str(String),
}



@@ 53,7 53,7 @@ fn mutate_that_data(itself: Value) -> Value {
    println!("mutating the data");
    let new_data: Box<Vec<MyValue>> = Box::new(vec![
        MyValue::Str("foo".to_string()),
        MyValue::Vec(Box::new(vec![MyValue::Str("bar".to_string())])),
        MyValue::Vec(vec![MyValue::Str("bar".to_string())]),
    ]);
    wrap::update(itself, new_data);
    itself