Skip to content

Commit 3c0702c

Browse files
committed
chore(actix-rt): prepare release 2.11.0
1 parent fe31514 commit 3c0702c

File tree

6 files changed

+44
-33
lines changed

6 files changed

+44
-33
lines changed

Cargo.lock

Lines changed: 14 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ members = [
1515
]
1616

1717
[workspace.package]
18+
homepage = "https://actix.rs"
19+
repository = "https://github.com/actix/actix-net"
1820
license = "MIT OR Apache-2.0"
1921
edition = "2021"
2022
rust-version = "1.75"

actix-rt/CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
## 2.11.0
6+
7+
- Implement `ActixStream` for `tokio::io::BufReader<IO>`.
8+
- Deprecate the `pin` re-export.
59
- Minimum supported Rust version (MSRV) is now 1.75.
610

711
## 2.10.0

actix-rt/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "actix-rt"
3-
version = "2.10.0"
3+
version = "2.11.0"
44
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
55
description = "Tokio-based single-threaded async runtime for the Actix ecosystem"
6-
keywords = ["async", "futures", "io", "runtime"]
7-
homepage = "https://actix.rs"
8-
repository = "https://github.com/actix/actix-net"
96
categories = ["network-programming", "asynchronous"]
10-
license = "MIT OR Apache-2.0"
7+
keywords = ["async", "futures", "io", "runtime"]
8+
homepage.workspace = true
9+
repository.workspace = true
10+
license.workspace = true
1111
edition.workspace = true
1212
rust-version.workspace = true
1313

actix-rt/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
> Tokio-based single-threaded async runtime for the Actix ecosystem.
44
55
[![crates.io](https://img.shields.io/crates/v/actix-rt?label=latest)](https://crates.io/crates/actix-rt)
6-
[![Documentation](https://docs.rs/actix-rt/badge.svg?version=2.10.0)](https://docs.rs/actix-rt/2.10.0)
6+
[![Documentation](https://docs.rs/actix-rt/badge.svg?version=2.11.0)](https://docs.rs/actix-rt/2.11.0)
77
[![Version](https://img.shields.io/badge/rustc-1.46+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html)
88
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-rt.svg)
99
<br />
10-
[![dependency status](https://deps.rs/crate/actix-rt/2.10.0/status.svg)](https://deps.rs/crate/actix-rt/2.10.0)
10+
[![dependency status](https://deps.rs/crate/actix-rt/2.11.0/status.svg)](https://deps.rs/crate/actix-rt/2.11.0)
1111
![Download](https://img.shields.io/crates/d/actix-rt.svg)
1212
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/WghFtEH6Hb)
1313

actix-rt/src/lib.rs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ mod arbiter;
6161
mod runtime;
6262
mod system;
6363

64+
#[deprecated(since = "2.11.0", note = "Prefer `std::pin::pin!`.")]
6465
pub use tokio::pin;
6566
use tokio::task::JoinHandle;
6667

@@ -87,10 +88,11 @@ pub mod net {
8788
use std::{
8889
future::Future,
8990
io,
91+
pin::pin,
9092
task::{Context, Poll},
9193
};
9294

93-
use tokio::io::{AsyncRead, AsyncWrite, Interest};
95+
use tokio::io::{AsyncRead, AsyncWrite, BufReader, Interest};
9496
#[cfg(unix)]
9597
pub use tokio::net::{UnixDatagram, UnixListener, UnixStream};
9698
pub use tokio::{
@@ -115,29 +117,25 @@ pub mod net {
115117
impl ActixStream for TcpStream {
116118
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<Ready>> {
117119
let ready = self.ready(Interest::READABLE);
118-
tokio::pin!(ready);
119-
ready.poll(cx)
120+
pin!(ready).poll(cx)
120121
}
121122

122123
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<Ready>> {
123124
let ready = self.ready(Interest::WRITABLE);
124-
tokio::pin!(ready);
125-
ready.poll(cx)
125+
pin!(ready).poll(cx)
126126
}
127127
}
128128

129129
#[cfg(unix)]
130130
impl ActixStream for UnixStream {
131131
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<Ready>> {
132132
let ready = self.ready(Interest::READABLE);
133-
tokio::pin!(ready);
134-
ready.poll(cx)
133+
pin!(ready).poll(cx)
135134
}
136135

137136
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<Ready>> {
138137
let ready = self.ready(Interest::WRITABLE);
139-
tokio::pin!(ready);
140-
ready.poll(cx)
138+
pin!(ready).poll(cx)
141139
}
142140
}
143141

@@ -150,6 +148,16 @@ pub mod net {
150148
(**self).poll_write_ready(cx)
151149
}
152150
}
151+
152+
impl<Io: ActixStream> ActixStream for BufReader<Io> {
153+
fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<Ready>> {
154+
self.get_ref().poll_read_ready(cx)
155+
}
156+
157+
fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<Ready>> {
158+
self.get_ref().poll_write_ready(cx)
159+
}
160+
}
153161
}
154162

155163
pub mod time {

0 commit comments

Comments
 (0)