No function that takes an ArrayList(u8) needs to have an Allocator parameter.
>In Rust, read_to_end is part of a trait and appears in a vtable, so it can't be generic.
That's what my comment already said, yes.
>Object safety isn't a concern.
??? It was an example of the downside of Rust's choice. Object safety is a concern for std::io::Read::read_to_end. Rust's choice of having the Allocator be part of the type has forever doomed std::io::Read::read_to_end users from being unable to use any allocator for the Vec other than GlobalAlloc.