#clone #threading #move #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

#33 in #threading

Download history 55/week @ 2024-11-13 83/week @ 2024-11-20 48/week @ 2024-11-27 55/week @ 2024-12-04 87/week @ 2024-12-11 63/week @ 2024-12-18 12/week @ 2024-12-25 35/week @ 2025-01-01 104/week @ 2025-01-08 90/week @ 2025-01-15 83/week @ 2025-01-22 58/week @ 2025-01-29 82/week @ 2025-02-05 102/week @ 2025-02-12 49/week @ 2025-02-19 24/week @ 2025-02-26

278 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