diff options
| author | bors <bors@rust-lang.org> | 2015-12-20 07:19:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-12-20 07:19:07 +0000 |
| commit | d3aec9fd20e8ada5d91e4c991fee9eccdb3ae2cd (patch) | |
| tree | 202b40cab39f342802bb0c108ee9a5f76c393759 /src/libstd | |
| parent | b9fd0ca16d351bff4be04a0c5da65d2794cbf3f8 (diff) | |
| parent | cf03ceed14683419d1b6c9a04141f415b982348f (diff) | |
| download | rust-d3aec9fd20e8ada5d91e4c991fee9eccdb3ae2cd.tar.gz rust-d3aec9fd20e8ada5d91e4c991fee9eccdb3ae2cd.zip | |
Auto merge of #30454 - mmcco:size_t, r=alexcrichton
It returns sizeof(dirent_t), so I'm not sure why its return type is int. It's only used once, and that usage immediately casts it to usize.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 9ac11b442da..e634c10d8b7 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -127,11 +127,11 @@ impl Iterator for ReadDir { fn next(&mut self) -> Option<io::Result<DirEntry>> { extern { - fn rust_dirent_t_size() -> c_int; + fn rust_dirent_t_size() -> libc::size_t; } let mut buf: Vec<u8> = Vec::with_capacity(unsafe { - rust_dirent_t_size() as usize + rust_dirent_t_size() }); let ptr = buf.as_mut_ptr() as *mut libc::dirent; |
