mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-17 00:00:11 +02:00
io: fix clippy lint in write_all (#4358)
This commit is contained in:
@@ -283,7 +283,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Rust
|
||||
run: rustup update 1.56 && rustup default 1.56
|
||||
run: rustup update 1.57 && rustup default 1.57
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- name: Install clippy
|
||||
run: rustup component add clippy
|
||||
|
||||
@@ -42,7 +42,7 @@ where
|
||||
while !me.buf.is_empty() {
|
||||
let n = ready!(Pin::new(&mut *me.writer).poll_write(cx, me.buf))?;
|
||||
{
|
||||
let (_, rest) = mem::replace(&mut *me.buf, &[]).split_at(n);
|
||||
let (_, rest) = mem::take(&mut *me.buf).split_at(n);
|
||||
*me.buf = rest;
|
||||
}
|
||||
if n == 0 {
|
||||
|
||||
Reference in New Issue
Block a user