These are chat archives for rust-lang/rust

Aug 2016
Daniel Collin
Aug 11 2016 15:26
Is there a way to do a file.read_to_string(&mut foo) that takes in a size instead of reading the whole file? I can do some own implementation of it of course but wonder if there is an existing way to do it already?
Johann Tuffe
Aug 11 2016 15:43
You should use read_exact and then convert it to a String
Daniel Collin
Aug 11 2016 18:25
Yeah, I guess I need to do it myself at least.