Reading from stdin: performance

Yeah, I realise it doesn't set a capacity - sorry, I should have been more clear. Zero initialisation happens under the covers in the read_to_end method. Read_to_end also adaptively increases the number of bytes read per iteration as it goes along - so it's not just reading 1024 bytes at a time.

edit: without any unsafe trickery, my understanding is that there's no way around this - because you can't get an array of uninitialised data in Rust. While that's obviously right and proper under normal circumstances, I was hoping for some pre-canned faster way for common performance sensitive operations like this.

edit2: I'm pretty confident that stack vs heap is not the issue here - the C buffer is heap allocated. Increasing the size of the Vec as things go along clearly has a cost, but even with an entirely preallocated buffer, the program still takes twice as long as the C one.