Skip to content

Commit e77578c

Browse files
committed
No longer depend on lazy_static
1 parent 983fb67 commit e77578c

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ arrayvec = "0.5.1"
2020
hash32 = "0.1.1"
2121
hash32-derive = "0.1.0"
2222
heapless = "0.5.1"
23-
lazy_static = "1.4"
2423
typenum = "1.11.2"
2524

2625
[dependencies.hashbrown]

src/id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub(crate) struct Allocator {
1515
}
1616

1717
impl Allocator {
18-
pub fn new() -> Self {
18+
pub const fn new() -> Self {
1919
Allocator { new_id: atomic::AtomicU64::new(0) }
2020
}
2121

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
#[cfg(all(not(feature = "std"), feature = "alloc"))]
44
extern crate alloc;
55

6-
#[macro_use]
7-
extern crate lazy_static;
8-
96
#[cfg_attr(feature = "serde", macro_use)]
107
#[cfg(feature = "serde")]
118
extern crate serde;

src/node.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ pub enum MeasureFunc {
1515
Boxed(sys::Box<dyn Fn(Size<Number>) -> Size<f32>>),
1616
}
1717

18-
lazy_static! {
19-
/// Global stretch instance id allocator.
20-
static ref INSTANCE_ALLOCATOR: id::Allocator = id::Allocator::new();
21-
}
18+
/// Global stretch instance id allocator.
19+
static INSTANCE_ALLOCATOR: id::Allocator = id::Allocator::new();
2220

2321
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
2422
#[cfg_attr(not(any(feature = "std", feature = "alloc")), derive(hash32_derive::Hash32))]

0 commit comments

Comments
 (0)