1
Fork 0

Use const fn to abstract away the contents of UnsafeCell & friends.

This commit is contained in:
Eduard Burtescu 2015-05-27 11:18:36 +03:00
parent 6e8e4f847c
commit 377b0900ae
76 changed files with 417 additions and 525 deletions

View file

@ -17,7 +17,7 @@ mod inner {
use libc;
use time::Duration;
use ops::Sub;
use sync::{Once, ONCE_INIT};
use sync::Once;
use super::NSEC_PER_SEC;
pub struct SteadyTime {
@ -42,7 +42,7 @@ mod inner {
numer: 0,
denom: 0,
};
static ONCE: Once = ONCE_INIT;
static ONCE: Once = Once::new();
unsafe {
ONCE.call_once(|| {