Registry / utility / clone-macro

clone-macro

JSON →
library1.0.0rscratesunverified

Super simple utility macro for cloning before moving into a move closure/block.

# Cargo.toml [dependencies] clone-macro = "1.0.0"
INSTALL
IMPORT
SIG · CLONE-MACRO
C
clone-macro
utilityrustv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

clone
use clone_macro::clone;

Use the clone! macro to clone variables before moving them into a closure.

use clone_macro::clone; fn main() { let name = String::from("Alice"); let closure = clone!(name, || { println!("Hello, {}!", name); }); closure(); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
clone-macro — cargo add clone-macro · libregistry