mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-29 21:40:27 +00:00

If `Vec` has 0 capacity, it can store only 0 elements, so its len can be assumed to be always 0. I'm updating `DefaultLenType` to have a special case: `DefaultLenType<0>` will be represented by zero sized type which always has value 0. This allows reducing size of `heapless::Vec<u8, 0>` from 8 bytes to 0 bytes.
heapless
static
friendly data structures that don't require dynamic memory allocation
This project is developed and maintained by the libs team.
Documentation
Change log
Tests
$ # run all
$ cargo test --features serde
$ # run only for example histbuf tests
$ cargo test histbuf --features serde
License
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.
Contribution
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.
Description
Languages
Rust
100%