io::Write.write vs io::Write.write_all


#1

Is there any benefit to calling io:Write.write_all over io::Write::write for a Vec<u8> buffer?

As a memory-novice I’m not sure whether there’s any reason a slice of data would only be partially written to an in-memory buffer, or whether it would be written synchronously or not. I’m guessing in the case of Vec<u8> that it would all be a synchronous copy though?


#2

There’s basically no difference in the Write implementation for Vec<u8>.


#3

Awesome, thanks :smiley: