rust/src/libstd/sys
Barosl Lee 6065678e62 Use a different buffer doubling logic for std::sys::os::getcwd
Make `std::sys::os::getcwd` call `Vec::reserve(1)` followed by
`Vec::set_len` to double the buffer. This is to align with other similar
functions, such as:

- `std::sys_common::io::read_to_end_uninitialized`
- `std::sys::fs::readlink`

Also, reduce the initial buffer size from 2048 to 512. The previous size was
introduced with 4bc26ce in 2013, but it seems a bit excessive. This is
probably because buffer doubling was not implemented back then.
2015-08-28 04:48:03 +09:00
..
common Auto merge of #27808 - SimonSapin:utf16decoder, r=alexcrichton 2015-08-27 00:41:13 +00:00
unix Use a different buffer doubling logic for std::sys::os::getcwd 2015-08-28 04:48:03 +09:00
windows Auto merge of #27995 - nagisa:windows-error-message, r=alexcrichton 2015-08-25 16:22:17 +00:00