diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:18:36 +0300 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:19:03 +0300 |
| commit | 377b0900aede976b2d37a499bbd7b62c2e39b358 (patch) | |
| tree | b4a5a4431d36ed1a4e0a39c7d2ef2563ecac9bf4 /src/libstd/sys/windows/net.rs | |
| parent | 6e8e4f847c2ea02fec021ea15dfb2de6beac797a (diff) | |
| download | rust-377b0900aede976b2d37a499bbd7b62c2e39b358.tar.gz rust-377b0900aede976b2d37a499bbd7b62c2e39b358.zip | |
Use `const fn` to abstract away the contents of UnsafeCell & friends.
Diffstat (limited to 'src/libstd/sys/windows/net.rs')
| -rw-r--r-- | src/libstd/sys/windows/net.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/net.rs b/src/libstd/sys/windows/net.rs index 6bbcd968157..71e064bcc6b 100644 --- a/src/libstd/sys/windows/net.rs +++ b/src/libstd/sys/windows/net.rs @@ -18,7 +18,7 @@ use net::SocketAddr; use num::One; use ops::Neg; use rt; -use sync::{Once, ONCE_INIT}; +use sync::Once; use sys::c; use sys_common::{AsInner, FromInner}; @@ -29,7 +29,7 @@ pub struct Socket(libc::SOCKET); /// Checks whether the Windows socket interface has been started already, and /// if not, starts it. pub fn init() { - static START: Once = ONCE_INIT; + static START: Once = Once::new(); START.call_once(|| unsafe { let mut data: c::WSADATA = mem::zeroed(); |
