mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
Stablize pin feature (#814)
Box::pinned has been renamed to Box::pin. Meanwhile, the pin feature no longer requires an attribute to enable. Fixes: #813
This commit is contained in:
committed by
Sean McArthur
parent
c8a990eda4
commit
03e2e864f3
@@ -19,7 +19,7 @@ pub struct Compat<T>(Pin<Box<T>>);
|
||||
impl<T> Compat<T> {
|
||||
/// Create a new `Compat` backed by `future`.
|
||||
pub fn new(future: T) -> Compat<T> {
|
||||
Compat(Box::pinned(future))
|
||||
Compat(Box::pin(future))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user