Skip to content

Commit b810b4a

Browse files
authored
Use std::pin::pin! macro instead of pin-utils (#366)
std::pin::pin! macro has been stabilized in Rust 1.68.
1 parent bf80a9c commit b810b4a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Cargo.toml

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rust-version = "1.73"
2121
[features]
2222
default = []
2323
checkpoint = ["serde", "serde_json"]
24-
futures = ["pin-utils"]
24+
futures = []
2525

2626
[dependencies]
2727
cfg-if = "1.0.0"
@@ -34,9 +34,6 @@ generator = "0.8.1"
3434
serde = { version = "1.0.113", features = ["derive"], optional = true }
3535
serde_json = { version = "1.0.33", optional = true }
3636

37-
# Requires for "futures" feature
38-
pin-utils = { version = "0.1.0", optional = true }
39-
4037
tracing = { version = "0.1.27", default-features = false, features = ["std"] }
4138
tracing-subscriber = { version = "0.3.8", features = ["env-filter"] }
4239

src/future/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ pub use self::atomic_waker::AtomicWaker;
77
use crate::rt;
88
use crate::sync::Arc;
99

10-
use pin_utils::pin_mut;
1110
use std::future::Future;
1211
use std::mem;
12+
use std::pin::pin;
1313
use std::task::{Context, Poll, RawWaker, RawWakerVTable, Waker};
1414

1515
/// Block the current thread, driving `f` to completion.
@@ -18,7 +18,7 @@ pub fn block_on<F>(f: F) -> F::Output
1818
where
1919
F: Future,
2020
{
21-
pin_mut!(f);
21+
let mut f = pin!(f);
2222

2323
let notify = Arc::new(rt::Notify::new(false, true));
2424

0 commit comments

Comments
 (0)