diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 835d0d42..3e77e990 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: version: - - 1.39.0 + - 1.42.0 - stable - nightly diff --git a/README.md b/README.md index b291fd13..827f937f 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ Actix net - framework for composable network services ## Documentation & community resources -* [Chat on gitter](https://gitter.im/actix/actix) -* Minimum supported Rust version: 1.39 or later +* [Chat on Gitter](https://gitter.im/actix/actix) +* Minimum supported Rust version: 1.42 or later ## Example diff --git a/actix-server/src/builder.rs b/actix-server/src/builder.rs index 2e8ae30e..f3f6ad86 100644 --- a/actix-server/src/builder.rs +++ b/actix-server/src/builder.rs @@ -276,7 +276,7 @@ impl ServerBuilder { info!("Starting \"{}\" service on {}", sock.1, sock.2); } self.accept.start( - mem::replace(&mut self.sockets, Vec::new()) + mem::take(&mut self.sockets) .into_iter() .map(|t| (t.0, t.2)) .collect(), @@ -355,7 +355,7 @@ impl ServerBuilder { // stop accept thread self.accept.send(Command::Stop); - let notify = std::mem::replace(&mut self.notify, Vec::new()); + let notify = std::mem::take(&mut self.notify); // stop workers if !self.workers.is_empty() && graceful { diff --git a/actix-utils/src/timeout.rs b/actix-utils/src/timeout.rs index 83fbb84f..818e6d26 100644 --- a/actix-utils/src/timeout.rs +++ b/actix-utils/src/timeout.rs @@ -58,10 +58,7 @@ impl PartialEq for TimeoutError { TimeoutError::Service(e2) => e1 == e2, TimeoutError::Timeout => false, }, - TimeoutError::Timeout => match other { - TimeoutError::Service(_) => false, - TimeoutError::Timeout => true, - }, + TimeoutError::Timeout => matches!(other, TimeoutError::Timeout), } } }