Skip to content

Commit

Permalink
Use std::pin::pin! macro instead of pin-utils
Browse files Browse the repository at this point in the history
std::pin::pin! macro has been stabilized in Rust 1.68.
  • Loading branch information
taiki-e committed Sep 15, 2024
1 parent c66568b commit 8cdd480
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rust-version = "1.73"
[features]
default = []
checkpoint = ["serde", "serde_json"]
futures = ["pin-utils"]
futures = []

[dependencies]
cfg-if = "1.0.0"
Expand All @@ -34,9 +34,6 @@ generator = "0.8.1"
serde = { version = "1.0.92", features = ["derive"], optional = true }
serde_json = { version = "1.0.33", optional = true }

# Requires for "futures" feature
pin-utils = { version = "0.1.0", optional = true }

tracing = { version = "0.1.27", default-features = false, features = ["std"] }
tracing-subscriber = { version = "0.3.8", features = ["env-filter"] }

Expand Down
4 changes: 2 additions & 2 deletions src/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ pub use self::atomic_waker::AtomicWaker;
use crate::rt;
use crate::sync::Arc;

use pin_utils::pin_mut;
use std::future::Future;
use std::mem;
use std::pin::pin;
use std::task::{Context, Poll, RawWaker, RawWakerVTable, Waker};

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

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

Expand Down

0 comments on commit 8cdd480

Please sign in to comment.