Build an array dynamically without heap allocations, deferring errors to a
single build callsite.
let arr: = new
.push
.push
.push
.build_exact
.unwrap;
assert_eq!;
You can choose how to handle the wrong number of push
calls:
Comparison with other libraries
- [
arrayvec] requires you to handle over-provision at each call totry_push. array_builderwill [panic!] on over-provision.