| Crates.io | chainit |
| lib.rs | chainit |
| version | 0.1.0 |
| created_at | 2025-07-28 14:44:11.088065+00 |
| updated_at | 2025-07-28 14:44:11.088065+00 |
| description | Quick solve for "PLEASE JUST MAKE THIS SHI CHAIN!!!!!!!" situations. |
| homepage | |
| repository | https://github.com/AWeirdDev/chainit |
| max_upload_size | |
| id | 1771222 |
| size | 4,993 |
This essentially solves the "PLEASE JUST MAKE THIS SHI CHAIN!!!!!!!" situations.
Just use the chained() function and start chaining everything.
use chainit::chained;
fn do_something() {}
fn main() {
let res = chained(100)
.chain(|item| item - 1)
.chain(|mut item| {
item += 1;
do_something();
item
})
.take();
assert_eq!(res, 100);
}