diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-17 00:56:00 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-20 23:06:54 -0700 |
| commit | 19dc3b50bd63489988eb8fc83d25b08ca83df151 (patch) | |
| tree | e5e2cdf9ce3389bdf871f3c99128a9b992de63a6 /src/libnative/io/timer_unix.rs | |
| parent | 1ba7bd10c9c537687ca393eca0b323569309b83a (diff) | |
| download | rust-19dc3b50bd63489988eb8fc83d25b08ca83df151.tar.gz rust-19dc3b50bd63489988eb8fc83d25b08ca83df151.zip | |
core: Stabilize the mem module
Excluding the functions inherited from the cast module last week (with marked
stability levels), these functions received the following treatment.
* size_of - this method has become #[stable]
* nonzero_size_of/nonzero_size_of_val - these methods have been removed
* min_align_of - this method is now #[stable]
* pref_align_of - this method has been renamed without the
`pref_` prefix, and it is the "default alignment" now. This decision is in line
with what clang does (see url linked in comment on function). This function
is now #[stable].
* init - renamed to zeroed and marked #[stable]
* uninit - marked #[stable]
* move_val_init - renamed to overwrite and marked #[stable]
* {from,to}_{be,le}{16,32,64} - all functions marked #[stable]
* swap/replace/drop - marked #[stable]
* size_of_val/min_align_of_val/align_of_val - these functions are marked
#[unstable], but will continue to exist in some form. Concerns have been
raised about their `_val` prefix.
[breaking-change]
Diffstat (limited to 'src/libnative/io/timer_unix.rs')
| -rw-r--r-- | src/libnative/io/timer_unix.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libnative/io/timer_unix.rs b/src/libnative/io/timer_unix.rs index 2c5b7984827..ed218022b2e 100644 --- a/src/libnative/io/timer_unix.rs +++ b/src/libnative/io/timer_unix.rs @@ -87,17 +87,17 @@ pub enum Req { // returns the current time (in milliseconds) pub fn now() -> u64 { unsafe { - let mut now: libc::timeval = mem::init(); + let mut now: libc::timeval = mem::zeroed(); assert_eq!(c::gettimeofday(&mut now, ptr::null()), 0); return (now.tv_sec as u64) * 1000 + (now.tv_usec as u64) / 1000; } } fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) { - let mut set: c::fd_set = unsafe { mem::init() }; + let mut set: c::fd_set = unsafe { mem::zeroed() }; let mut fd = FileDesc::new(input, true); - let mut timeout: libc::timeval = unsafe { mem::init() }; + let mut timeout: libc::timeval = unsafe { mem::zeroed() }; // active timers are those which are able to be selected upon (and it's a // sorted list, and dead timers are those which have expired, but ownership |
