mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-30 17:44:34 +01:00
address unused warning
This commit is contained in:
parent
233c61ba08
commit
8891c2681e
@ -8,8 +8,7 @@ use crate::{
|
|||||||
server::ServerCommand,
|
server::ServerCommand,
|
||||||
service::{InternalServiceFactory, ServiceFactory, StreamNewService},
|
service::{InternalServiceFactory, ServiceFactory, StreamNewService},
|
||||||
socket::{
|
socket::{
|
||||||
create_mio_tcp_listener, MioListener, MioTcpListener, StdSocketAddr, StdTcpListener,
|
create_mio_tcp_listener, MioListener, MioTcpListener, StdTcpListener, ToSocketAddrs,
|
||||||
ToSocketAddrs,
|
|
||||||
},
|
},
|
||||||
worker::ServerWorkerConfig,
|
worker::ServerWorkerConfig,
|
||||||
Server,
|
Server,
|
||||||
@ -243,7 +242,8 @@ impl ServerBuilder {
|
|||||||
use std::net::{IpAddr, Ipv4Addr};
|
use std::net::{IpAddr, Ipv4Addr};
|
||||||
lst.set_nonblocking(true)?;
|
lst.set_nonblocking(true)?;
|
||||||
let token = self.next_token();
|
let token = self.next_token();
|
||||||
let addr = StdSocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
|
let addr =
|
||||||
|
crate::socket::StdSocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
|
||||||
self.factories.push(StreamNewService::create(
|
self.factories.push(StreamNewService::create(
|
||||||
name.as_ref().to_string(),
|
name.as_ref().to_string(),
|
||||||
token,
|
token,
|
||||||
|
@ -56,221 +56,124 @@
|
|||||||
|
|
||||||
|
|
||||||
## 1.0.6 - 2020-08-09
|
## 1.0.6 - 2020-08-09
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
* Removed unsound custom Cell implementation that allowed obtaining several mutable references to
|
* Removed unsound custom Cell implementation that allowed obtaining several mutable references to
|
||||||
the same data, which is undefined behavior in Rust and could lead to violations of memory safety. External code could obtain several mutable references to the same data through
|
the same data, which is undefined behavior in Rust and could lead to violations of memory safety. External code could obtain several mutable references to the same data through
|
||||||
service combinators. Attempts to acquire several mutable references to the same data will instead
|
service combinators. Attempts to acquire several mutable references to the same data will instead
|
||||||
result in a panic.
|
result in a panic.
|
||||||
|
|
||||||
## [1.0.5] - 2020-01-16
|
|
||||||
|
|
||||||
### Fixed
|
## 1.0.5 - 2020-01-16
|
||||||
|
* Fixed unsoundness in .and_then()/.then() service combinators.
|
||||||
|
|
||||||
* Fixed unsoundness in .and_then()/.then() service combinators
|
|
||||||
|
|
||||||
## [1.0.4] - 2020-01-15
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
|
## 1.0.4 - 2020-01-15
|
||||||
* Revert 1.0.3 change
|
* Revert 1.0.3 change
|
||||||
|
|
||||||
## [1.0.3] - 2020-01-15
|
|
||||||
|
|
||||||
### Fixed
|
## 1.0.3 - 2020-01-15
|
||||||
|
* Fixed unsoundness in `AndThenService` impl.
|
||||||
* Fixed unsoundness in `AndThenService` impl
|
|
||||||
|
|
||||||
## [1.0.2] - 2020-01-08
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
* Add `into_service` helper function
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.1] - 2019-12-22
|
## 1.0.2 - 2020-01-08
|
||||||
|
* Add `into_service` helper function.
|
||||||
### Changed
|
|
||||||
|
|
||||||
* `map_config()` and `unit_config()` accepts `IntoServiceFactory` type
|
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0] - 2019-12-11
|
## 1.0.1 - 2019-12-22
|
||||||
|
* `map_config()` and `unit_config()` now accept `IntoServiceFactory` type.
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
|
## 1.0.0 - 2019-12-11
|
||||||
* Add Clone impl for Apply service
|
* Add Clone impl for Apply service
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0-alpha.4] - 2019-12-08
|
## 1.0.0-alpha.4 - 2019-12-08
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Renamed `service_fn` to `fn_service`
|
* Renamed `service_fn` to `fn_service`
|
||||||
|
|
||||||
* Renamed `factory_fn` to `fn_factory`
|
* Renamed `factory_fn` to `fn_factory`
|
||||||
|
|
||||||
* Renamed `factory_fn_cfg` to `fn_factory_with_config`
|
* Renamed `factory_fn_cfg` to `fn_factory_with_config`
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0-alpha.3] - 2019-12-06
|
## 1.0.0-alpha.3 - 2019-12-06
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Add missing Clone impls
|
* Add missing Clone impls
|
||||||
|
|
||||||
* Restore `Transform::map_init_err()` combinator
|
* Restore `Transform::map_init_err()` combinator
|
||||||
|
|
||||||
* Restore `Service/Factory::apply_fn()` in form of `Pipeline/Factory::and_then_apply_fn()`
|
* Restore `Service/Factory::apply_fn()` in form of `Pipeline/Factory::and_then_apply_fn()`
|
||||||
|
|
||||||
* Optimize service combinators and futures memory layout
|
* Optimize service combinators and futures memory layout
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0-alpha.2] - 2019-12-02
|
## 1.0.0-alpha.2 - 2019-12-02
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Use owned config value for service factory
|
* Use owned config value for service factory
|
||||||
|
|
||||||
* Renamed BoxedNewService/BoxedService to BoxServiceFactory/BoxService
|
* Renamed BoxedNewService/BoxedService to BoxServiceFactory/BoxService
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0-alpha.1] - 2019-11-25
|
## 1.0.0-alpha.1 - 2019-11-25
|
||||||
|
* Migrated to `std::future`
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Migraded to `std::future`
|
|
||||||
|
|
||||||
* `NewService` renamed to `ServiceFactory`
|
* `NewService` renamed to `ServiceFactory`
|
||||||
|
|
||||||
* Added `pipeline` and `pipeline_factory` function
|
* Added `pipeline` and `pipeline_factory` function
|
||||||
|
|
||||||
|
|
||||||
## [0.4.2] - 2019-08-27
|
## 0.4.2 - 2019-08-27
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
* Check service readiness for `new_apply_cfg` combinator
|
* Check service readiness for `new_apply_cfg` combinator
|
||||||
|
|
||||||
|
|
||||||
## [0.4.1] - 2019-06-06
|
## 0.4.1 - 2019-06-06
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
* Add `new_apply_cfg` function
|
* Add `new_apply_cfg` function
|
||||||
|
|
||||||
## [0.4.0] - 2019-05-12
|
|
||||||
|
|
||||||
### Changed
|
## 0.4.0 - 2019-05-12
|
||||||
|
* Add `NewService::map_config` and `NewService::unit_config` combinators.
|
||||||
* Use associated type for `NewService` config
|
* Use associated type for `NewService` config.
|
||||||
|
* Change `apply_cfg` function.
|
||||||
* Change `apply_cfg` function
|
* Renamed helper functions.
|
||||||
|
|
||||||
* Renamed helper functions
|
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
* Add `NewService::map_config` and `NewService::unit_config` combinators
|
|
||||||
|
|
||||||
|
|
||||||
## [0.3.6] - 2019-04-07
|
## 0.3.6 - 2019-04-07
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Poll boxed service call result immediately
|
* Poll boxed service call result immediately
|
||||||
|
|
||||||
|
|
||||||
## [0.3.5] - 2019-03-29
|
## 0.3.5 - 2019-03-29
|
||||||
|
* Add `impl<S: Service> Service for Rc<RefCell<S>>`.
|
||||||
### Added
|
|
||||||
|
|
||||||
* Add `impl<S: Service> Service for Rc<RefCell<S>>`
|
|
||||||
|
|
||||||
|
|
||||||
## [0.3.4] - 2019-03-12
|
## 0.3.4 - 2019-03-12
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
* Add `Transform::from_err()` combinator
|
* Add `Transform::from_err()` combinator
|
||||||
|
|
||||||
* Add `apply_fn` helper
|
* Add `apply_fn` helper
|
||||||
|
|
||||||
* Add `apply_fn_factory` helper
|
* Add `apply_fn_factory` helper
|
||||||
|
|
||||||
* Add `apply_transform` helper
|
* Add `apply_transform` helper
|
||||||
|
|
||||||
* Add `apply_cfg` helper
|
* Add `apply_cfg` helper
|
||||||
|
|
||||||
|
|
||||||
## [0.3.3] - 2019-03-09
|
## 0.3.3 - 2019-03-09
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
* Add `ApplyTransform` new service for transform and new service.
|
* Add `ApplyTransform` new service for transform and new service.
|
||||||
|
* Add `NewService::apply_cfg()` combinator, allows to use nested `NewService` with different config parameter.
|
||||||
* Add `NewService::apply_cfg()` combinator, allows to use
|
|
||||||
nested `NewService` with different config parameter.
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Revert IntoFuture change
|
* Revert IntoFuture change
|
||||||
|
|
||||||
|
|
||||||
## [0.3.2] - 2019-03-04
|
## 0.3.2 - 2019-03-04
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Change `NewService::Future` and `Transform::Future` to the `IntoFuture` trait.
|
* Change `NewService::Future` and `Transform::Future` to the `IntoFuture` trait.
|
||||||
|
|
||||||
* Export `AndThenTransform` type
|
* Export `AndThenTransform` type
|
||||||
|
|
||||||
|
|
||||||
## [0.3.1] - 2019-03-04
|
## 0.3.1 - 2019-03-04
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Simplify Transform trait
|
* Simplify Transform trait
|
||||||
|
|
||||||
|
|
||||||
## [0.3.0] - 2019-03-02
|
## 0.3.0 - 2019-03-02
|
||||||
|
|
||||||
## Added
|
|
||||||
|
|
||||||
* Added boxed NewService and Service.
|
* Added boxed NewService and Service.
|
||||||
|
|
||||||
## Changed
|
|
||||||
|
|
||||||
* Added `Config` parameter to `NewService` trait.
|
* Added `Config` parameter to `NewService` trait.
|
||||||
|
|
||||||
* Added `Config` parameter to `NewTransform` trait.
|
* Added `Config` parameter to `NewTransform` trait.
|
||||||
|
|
||||||
|
|
||||||
## [0.2.2] - 2019-02-19
|
## 0.2.2 - 2019-02-19
|
||||||
|
|
||||||
### Added
|
|
||||||
|
|
||||||
* Added `NewService` impl for `Rc<S> where S: NewService`
|
* Added `NewService` impl for `Rc<S> where S: NewService`
|
||||||
|
|
||||||
* Added `NewService` impl for `Arc<S> where S: NewService`
|
* Added `NewService` impl for `Arc<S> where S: NewService`
|
||||||
|
|
||||||
|
|
||||||
## [0.2.1] - 2019-02-03
|
## 0.2.1 - 2019-02-03
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Generalize `.apply` combinator with Transform trait
|
* Generalize `.apply` combinator with Transform trait
|
||||||
|
|
||||||
|
|
||||||
## [0.2.0] - 2019-02-01
|
## 0.2.0 - 2019-02-01
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Use associated type instead of generic for Service definition.
|
* Use associated type instead of generic for Service definition.
|
||||||
|
|
||||||
* Before:
|
* Before:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
impl Service<Request> for Client {
|
impl Service<Request> for Client {
|
||||||
type Response = Response;
|
type Response = Response;
|
||||||
@ -278,7 +181,6 @@
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
* After:
|
* After:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
impl Service for Client {
|
impl Service for Client {
|
||||||
type Request = Request;
|
type Request = Request;
|
||||||
@ -288,50 +190,30 @@
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## [0.1.6] - 2019-01-24
|
## 0.1.6 - 2019-01-24
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Use `FnMut` instead of `Fn` for .apply() and .map() combinators and `FnService` type
|
* Use `FnMut` instead of `Fn` for .apply() and .map() combinators and `FnService` type
|
||||||
|
|
||||||
* Change `.apply()` error semantic, new service's error is `From<Self::Error>`
|
* Change `.apply()` error semantic, new service's error is `From<Self::Error>`
|
||||||
|
|
||||||
|
|
||||||
## [0.1.5] - 2019-01-13
|
## 0.1.5 - 2019-01-13
|
||||||
|
* Make `Out::Error` convertible from `T::Error` for apply combinator
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Make `Out::Error` convertable from `T::Error` for apply combinator
|
|
||||||
|
|
||||||
|
|
||||||
## [0.1.4] - 2019-01-11
|
## 0.1.4 - 2019-01-11
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Use `FnMut` instead of `Fn` for `FnService`
|
* Use `FnMut` instead of `Fn` for `FnService`
|
||||||
|
|
||||||
|
|
||||||
## [0.1.3] - 2018-12-12
|
## 0.1.3 - 2018-12-12
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
* Split service combinators to separate trait
|
* Split service combinators to separate trait
|
||||||
|
|
||||||
|
|
||||||
## [0.1.2] - 2018-12-12
|
## 0.1.2 - 2018-12-12
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
* Release future early for `.and_then()` and `.then()` combinators
|
* Release future early for `.and_then()` and `.then()` combinators
|
||||||
|
|
||||||
|
|
||||||
## [0.1.1] - 2018-12-09
|
## 0.1.1 - 2018-12-09
|
||||||
|
* Added Service impl for `Box<S: Service>`
|
||||||
### Added
|
|
||||||
|
|
||||||
* Added Service impl for Box<S: Service>
|
|
||||||
|
|
||||||
|
|
||||||
## [0.1.0] - 2018-12-09
|
## 0.1.0 - 2018-12-09
|
||||||
|
|
||||||
* Initial import
|
* Initial import
|
||||||
|
Loading…
Reference in New Issue
Block a user