1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 16:52:58 +01:00

bump MSRV to 1.42 (#180)

This commit is contained in:
Rob Ede 2020-08-17 15:37:57 +01:00 committed by GitHub
parent 5d28be9ad6
commit fb098536ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 9 deletions

View File

@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
version:
- 1.39.0
- 1.42.0
- stable
- nightly

View File

@ -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

View File

@ -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 {

View File

@ -58,10 +58,7 @@ impl<E: PartialEq> PartialEq for TimeoutError<E> {
TimeoutError::Service(e2) => e1 == e2,
TimeoutError::Timeout => false,
},
TimeoutError::Timeout => match other {
TimeoutError::Service(_) => false,
TimeoutError::Timeout => true,
},
TimeoutError::Timeout => matches!(other, TimeoutError::Timeout),
}
}
}