I'm having trouble googling this. Is there a builtin function that takes a &str or a std::fs::File, and return the entire file as Vec ?
Yes, a free function in the fs
module:
4 Likes
@scottmcm : Great; thanks! It even links to read_to_end
which turns out to work even better in this case. Thanks!
1 Like