File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed
Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -17,15 +17,17 @@ exclude = ["/.travis.yml", "/appveyor.yml"]
1717build = " build.rs"
1818
1919[dependencies .spin ]
20- version = " 0.4.6 "
20+ version = " 0.4.10 "
2121optional = true
22+ default-features = false
23+ features = [" once" ]
2224
2325[build-dependencies ]
2426version_check = " 0.1.4"
2527
2628[features ]
2729nightly = []
28- spin_no_std = [" nightly " , " spin" ]
30+ spin_no_std = [" spin" ]
2931
3032[badges ]
3133appveyor = { repository = " rust-lang-nursery/lazy-static.rs" }
Original file line number Diff line number Diff line change @@ -12,10 +12,7 @@ use self::spin::Once;
1212pub struct Lazy < T : Sync > ( Once < T > ) ;
1313
1414impl < T : Sync > Lazy < T > {
15- #[ inline( always) ]
16- pub const fn new ( ) -> Self {
17- Lazy ( Once :: new ( ) )
18- }
15+ pub const INIT : Self = Lazy ( Once :: INIT ) ;
1916
2017 #[ inline( always) ]
2118 pub fn get < F > ( & ' static self , builder : F ) -> & T
@@ -29,6 +26,6 @@ impl<T: Sync> Lazy<T> {
2926#[ doc( hidden) ]
3027macro_rules! __lazy_static_create {
3128 ( $NAME: ident, $T: ty) => {
32- static $NAME: $crate:: lazy:: Lazy <$T> = $crate:: lazy:: Lazy :: new ( ) ;
29+ static $NAME: $crate:: lazy:: Lazy <$T> = $crate:: lazy:: Lazy :: INIT ;
3330 }
3431}
Original file line number Diff line number Diff line change @@ -100,9 +100,6 @@ no guarantees can be made about them in regard to SemVer stability.
100100
101101*/
102102
103- // NOTE: see build.rs for where these cfg values are set.
104- #![ cfg_attr( lazy_static_spin_impl, feature( const_fn) ) ]
105-
106103#![ doc( html_root_url = "https://docs.rs/lazy_static/1.1.0" ) ]
107104#![ no_std]
108105
Original file line number Diff line number Diff line change 11#![ cfg( feature="spin_no_std" ) ]
2- #![ feature( const_fn) ]
32
43#![ no_std]
54
You can’t perform that action at this time.
0 commit comments