#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

#2273 in Rust patterns

Download history 34/week @ 2023-10-17 34/week @ 2023-10-24 36/week @ 2023-10-31 38/week @ 2023-11-07 32/week @ 2023-11-14 32/week @ 2023-11-21 42/week @ 2023-11-28 26/week @ 2023-12-05 31/week @ 2023-12-12 34/week @ 2023-12-19 33/week @ 2023-12-26 25/week @ 2024-01-02 41/week @ 2024-01-09 32/week @ 2024-01-16 28/week @ 2024-01-23 37/week @ 2024-01-30

142 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