| Crates.io | functional_vec |
| lib.rs | functional_vec |
| version | 0.2.0 |
| created_at | 2023-04-30 03:02:06.972407+00 |
| updated_at | 2023-05-01 16:47:20.224409+00 |
| description | Owning versions of mutable Vec methods. |
| homepage | |
| repository | https://github.com/SKyletoft/functional_vec |
| max_upload_size | |
| id | 852514 |
| size | 29,255 |
Owning versions of all mutable vec methods. Makes vecs slightly more ergonomic to use in folds.
Supports no_std environments using the alloc crate directly.
use functional_vec::FunctionalVec;
let v = (0..10).fold(
Vec::new(),
|acc, curr| acc.push_new(curr)
);
assert_eq!(v, vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
This crate supports std::vec::Vec and std::collections::VecDeque
by default. smallvec::SmallVec from the crate smallvec (Version
1.10) is also supported if you enable the smallvec feature.