#clone #move #closures #threading

clone_all

clone_all!(my,variables,with,long,names);

2 releases

Uses old Rust 2015

0.1.1 Apr 28, 2018
0.1.0 Apr 28, 2018

#31 in #threading

Download history 10/week @ 2023-11-26 2/week @ 2023-12-03 1/week @ 2023-12-10 7/week @ 2023-12-17 4/week @ 2023-12-24 10/week @ 2024-01-07 7/week @ 2024-01-14 4/week @ 2024-01-21 4/week @ 2024-01-28 9/week @ 2024-02-04 13/week @ 2024-02-11 40/week @ 2024-02-18 31/week @ 2024-02-25 32/week @ 2024-03-03 19/week @ 2024-03-10

124 downloads per month
Used in momen

MIT/Apache

6KB

clone_all

clone_all provides a simple macro to clone all variables passed to it.

For example:

let x: String = "hello world".into();
{
    clone_all!(x);
    something_that_moves(x);
}
// we can still use x, because the x in the scope was cloned.
println!("{}", x);

No runtime deps