Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

armanriazi•rust•error•error[E0382]: borrow of moved value: `val` ... thread

    //resolved by commenting println line
    thread::spawn(move || {
        let val = String::from("hi");
        tx.send(val).unwrap();
       // println!("val is {}", val);
    });
 
PREVIOUS NEXT
Tagged: #borrow #moved #thread
ADD COMMENT
Topic
Name
4+6 =