From 0f1d5b64a14fa876ad9209fff9ccacc64176867d Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 18 Jun 2021 21:11:53 +0900 Subject: [PATCH 1/3] Update to new io_slice_advance interface --- futures-util/src/io/write_all_vectored.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/futures-util/src/io/write_all_vectored.rs b/futures-util/src/io/write_all_vectored.rs index f465209fe2..a8fc4c641c 100644 --- a/futures-util/src/io/write_all_vectored.rs +++ b/futures-util/src/io/write_all_vectored.rs @@ -4,7 +4,6 @@ use futures_core::task::{Context, Poll}; use futures_io::AsyncWrite; use futures_io::IoSlice; use std::io; -use std::mem; use std::pin::Pin; /// Future for the @@ -19,8 +18,9 @@ pub struct WriteAllVectored<'a, W: ?Sized + Unpin> { impl Unpin for WriteAllVectored<'_, W> {} impl<'a, W: AsyncWrite + ?Sized + Unpin> WriteAllVectored<'a, W> { - pub(super) fn new(writer: &'a mut W, bufs: &'a mut [IoSlice<'a>]) -> Self { - Self { writer, bufs: IoSlice::advance(bufs, 0) } + pub(super) fn new(writer: &'a mut W, mut bufs: &'a mut [IoSlice<'a>]) -> Self { + IoSlice::advance_slices(&mut bufs, 0); + Self { writer, bufs } } } @@ -34,7 +34,7 @@ impl Future for WriteAllVectored<'_, W> { if n == 0 { return Poll::Ready(Err(io::ErrorKind::WriteZero.into())); } else { - this.bufs = IoSlice::advance(mem::take(&mut this.bufs), n); + IoSlice::advance_slices(&mut this.bufs, n); } } From dde398662c153e367c081304593a631dfcf07c41 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 18 Jun 2021 21:42:02 +0900 Subject: [PATCH 2/3] Do not use rustup-components-history It sometimes stops: https://github.com/rust-lang/rustup-components-history/issues/34 --- .github/workflows/ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4cbd220da..3e93f4c075 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -254,12 +254,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install Rust and Clippy - run: | - toolchain=nightly-$(curl -sSf https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy) - rustup set profile minimal - rustup default "$toolchain" - rustup component add clippy + - name: Install Rust + run: rustup toolchain install nightly --component clippy && rustup default nightly - run: cargo clippy --workspace --all-features --all-targets fmt: From ce683a5434a845f2b63a11e8b7cbcf78befd929a Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 18 Jun 2021 21:50:00 +0900 Subject: [PATCH 3/3] Temporarily disable test with release mode on aarch64-unknown-linux-gnu Refs: https://github.com/rust-lang/futures-rs/issues/2451 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e93f4c075..08750e0cc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,8 @@ jobs: - run: cargo install cross - run: cross test --target ${{ matrix.target }} --workspace --all-features - run: cross test --target ${{ matrix.target }} --workspace --all-features --release + # TODO: https://github.com/rust-lang/futures-rs/issues/2451 + if: matrix.target != 'aarch64-unknown-linux-gnu' core-msrv: name: cargo +${{ matrix.rust }} build (futures-{core, io, sink, task})