I did a bit of reading and learned that the Rust allocation failure code doesn't panic, it aborts by calling a specific function. Could this crate use a similar technique to check for failure due to allocation in a function? Or is that out of scope for this project? If so it might be nice to have a note in the README for people like me who are mistaken about how allocation failures work.
I was a bit surprised to discover that this code compiles:
I did a bit of reading and learned that the Rust allocation failure code doesn't panic, it aborts by calling a specific function. Could this crate use a similar technique to check for failure due to allocation in a function? Or is that out of scope for this project? If so it might be nice to have a note in the README for people like me who are mistaken about how allocation failures work.