These are chat archives for rust-lang/rust

13th
Oct 2016
Michael Howell
@notriddle
Oct 13 2016 02:10
Hi there.
Andrey Ivanov
@a-nigredo
Oct 13 2016 06:24
Hi all, How to unbox boxed value in rust 1.12? In rust 1.11 I just used let binding but after installing 1.12 it stoped working
Arthur Silva
@arthurprs
Oct 13 2016 08:02
@a-nigredo you can just dereference the pointer.
fn main() {
    let a = Box::new(String::new());
    let b = *a;
    // println!("{}",a ); // use of moved value: `a`
    println!("{}",b );
}
Andrey Ivanov
@a-nigredo
Oct 13 2016 08:03
@arthurprs it helps, thanks a lot