#clone #move #threading #closures

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

#30 in #threading

Download history 153/week @ 2024-07-22 122/week @ 2024-07-29 95/week @ 2024-08-05 57/week @ 2024-08-12 86/week @ 2024-08-19 88/week @ 2024-08-26 195/week @ 2024-09-02 147/week @ 2024-09-09 61/week @ 2024-09-16 98/week @ 2024-09-23 88/week @ 2024-09-30 57/week @ 2024-10-07 101/week @ 2024-10-14 87/week @ 2024-10-21 48/week @ 2024-10-28 84/week @ 2024-11-04

325 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