miny
A Box<T> with T stored inline for values less than a pointer in size. Requires nightly Rust & alloc
use Miny;
let small = new;
let large = new;
// small is stored inline on the stack
assert!;
// large is stored with an allocation
assert!;
// consume the miny and get back a value
let original = into_inner;
assert_eq!;
For more information, read the docs.
Changelog
2.0.3
- Don't try to deallocate ZSTs when converting from a
Box(thanks, Cormac!) - Documenting invariants more
rsutilmerge documentation overhaul
2.0.2
- Account for changes in
ptrAPI's
2.0.1
- Documentation upgrade
2.0.0
- Redid the entire library to require qualified syntax, because I realized that that's probably a good idea
1.0.0
- Initial release
License
MIT or Apache 2.0
(also hi please give me suggestions for more features to add, this crate feels kinda small)