Skip to content

Commit bb73dfc

Browse files
committed
Switch from lazy_static to once_cell
1 parent c2e92df commit bb73dfc

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ futures = "0.3.15"
3333
ouroboros = "0.9"
3434
stop-token = "0.2"
3535
byte-pool = "0.2.2"
36-
lazy_static = "1.4.0"
36+
once_cell = "1.8.0"
3737
log = "0.4.8"
3838
thiserror = "1.0.9"
3939

src/imap_stream.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ use async_std::sync::Arc;
88
use byte_pool::{Block, BytePool};
99
use futures::task::{Context, Poll};
1010
use nom::Needed;
11+
use once_cell::sync::Lazy;
1112

1213
use crate::types::{Request, ResponseData};
1314

14-
lazy_static::lazy_static! {
15-
/// The global buffer pool we use for storing incoming data.
16-
pub(crate) static ref POOL: Arc<BytePool> = Arc::new(BytePool::new());
17-
}
15+
/// The global buffer pool we use for storing incoming data.
16+
pub(crate) static POOL: Lazy<Arc<BytePool>> = Lazy::new(|| Arc::new(BytePool::new()));
1817

1918
/// Wraps a stream, and parses incoming data as imap server messages. Writes outgoing data
2019
/// as imap client messages.

0 commit comments

Comments
 (0)