2 ms·
You can get a view into what Rust looks like with fallible allocation in Rust for Linux, since Linus required this. So e.g. Rust for Linux's Vec only has try_pu
by tialaramex 4y ago
You can get a view into what Rust looks like with fallible allocation in Rust for Linux, since Linus required this. So e.g. Rust for Linux's Vec only has try_push() and you'd better have successfully try_reserve'd enough space to push into or it may fail.
https://rust-for-linux.github.io/docs/alloc/vec/struct.Vec.html https://rust-for-linux.github.io/docs/alloc/vec/struct.Vec.h...
NB The prose for Vec here, including examples, is copied from the "real" Vec in Rust's standard library, so it talks about features like push but those are not actually provided in Rust for Linux.