https://github.com/aweirddev/chainit
Quick solve for "PLEASE JUST MAKE THIS SHI CHAIN!!!!!!!" situations.
https://github.com/aweirddev/chainit
chain rust
Last synced: 5 months ago
JSON representation
Quick solve for "PLEASE JUST MAKE THIS SHI CHAIN!!!!!!!" situations.
- Host: GitHub
- URL: https://github.com/aweirddev/chainit
- Owner: AWeirdDev
- Created: 2025-07-28T14:43:32.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-07-28T14:43:38.000Z (10 months ago)
- Last Synced: 2025-08-13T23:23:59.048Z (10 months ago)
- Topics: chain, rust
- Language: Rust
- Homepage: https://crates.io/crates/chainit
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chainit
This essentially solves the "PLEASE JUST MAKE THIS SHI CHAIN!!!!!!!" situations.
Just use the `chained()` function and start chaining everything.
```rust
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);
}
```