Crates.io | clown |
lib.rs | clown |
version | 1.1.1 |
source | src |
created_at | 2023-08-16 09:27:34.132021 |
updated_at | 2024-11-11 13:04:42.289848 |
description | approximation of capture-by-closure lambdas |
homepage | |
repository | https://github.com/zygomedia/clown |
max_upload_size | |
id | 945670 |
size | 7,886 |
An approximation of "capture-by-clone" lambdas in Rust.
Requires nightly and #![feature(proc_macro_hygiene, stmt_expr_attributes)]
Turns this:
#[clown] || do_call(honk!(foo.bar), slip!(baz.bop))
into this:
{
let __honk_0 = (foo.bar).clone();
let __slip_0 = baz.bop;
move || do_call(__honk_0, __slip_0)
}