We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b16abe commit 14aef3dCopy full SHA for 14aef3d
std/src/sys/pal/unix/os.rs
@@ -706,7 +706,7 @@ pub fn page_size() -> usize {
706
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/confstr.html
707
#[cfg(target_vendor = "apple")]
708
fn confstr(key: c_int, size_hint: Option<usize>) -> io::Result<OsString> {
709
- let mut buf: Vec<u8> = Vec::new();
+ let mut buf: Vec<u8> = Vec::with_capacity(0);
710
let mut bytes_needed_including_nul = size_hint
711
.unwrap_or_else(|| {
712
// Treat "None" as "do an extra call to get the length". In theory
0 commit comments