2 releases
Uses old Rust 2015
0.1.1 | Feb 1, 2018 |
---|---|
0.1.0 | Jan 31, 2018 |
#29 in #ref
Used in 3 crates
(via ergo_sync)
14KB
222 lines
taken: macros for taking ownership, staring Liam Neeson
See the library docs for more information
LICENSE
The source code in this repository is Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
lib.rs
:
Macros for taking ownership, starring Liam Neeson
This module exports the take!
macro which allows you to express ownership on one or more
variables.
All of them expand into some sort of let v = v;
. See the take!
for more details and possible use cases.
Special Thanks
This crate was created through the community efforts at /r/rust. Special thanks to:
- /u/CUViper for poiting out the tradeoffs of this strategy.
- /u/jasonkdark for the initial implementation.
- /u/i_r_witty for improving this quote
[In the voice of Liam Neeson] But what I do have are a very particular set of macros, macros I have acquired over a very long career. Macros that make me a nightmare for closures like you. If you let my variable go now, that'll be the end of it. I will not look for you, I will not pursue you. But if you don't, I will look for you, I will find you, and I will compile you.