mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
chore: fix clippy errors (#2571)
This commit is contained in:
parent
f2f30d4cf6
commit
db0d6d75b3
@ -359,8 +359,11 @@ macro_rules! select {
|
||||
let start = $crate::macros::support::thread_rng_n(BRANCHES);
|
||||
|
||||
for i in 0..BRANCHES {
|
||||
let branch = (start + i) % BRANCHES;
|
||||
|
||||
let branch;
|
||||
#[allow(clippy::modulo_one)]
|
||||
{
|
||||
branch = (start + i) % BRANCHES;
|
||||
}
|
||||
match branch {
|
||||
$(
|
||||
$crate::count!( $($skip)* ) => {
|
||||
|
@ -94,7 +94,7 @@ async fn drop_write() -> Result<()> {
|
||||
|
||||
let handle = thread::spawn(move || {
|
||||
let (mut stream, _) = listener.accept().unwrap();
|
||||
stream.write(MSG).unwrap();
|
||||
stream.write_all(MSG).unwrap();
|
||||
|
||||
let mut read_buf = [0u8; 32];
|
||||
let res = match stream.read(&mut read_buf) {
|
||||
|
@ -17,7 +17,7 @@ async fn split() -> Result<()> {
|
||||
|
||||
let handle = thread::spawn(move || {
|
||||
let (mut stream, _) = listener.accept().unwrap();
|
||||
stream.write(MSG).unwrap();
|
||||
stream.write_all(MSG).unwrap();
|
||||
|
||||
let mut read_buf = [0u8; 32];
|
||||
let read_len = stream.read(&mut read_buf).unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user