mirror of https://github.com/fafhrd91/actix-net
update http crate override
This commit is contained in:
parent
8fcaa1160f
commit
c7790bd3e0
|
@ -40,7 +40,7 @@ derive_more = "0.99.2"
|
||||||
either = "1.5.3"
|
either = "1.5.3"
|
||||||
futures-util = { version = "0.3.4", default-features = false }
|
futures-util = { version = "0.3.4", default-features = false }
|
||||||
# FIXME: Use release version
|
# FIXME: Use release version
|
||||||
http = { git = "https://github.com/paolobarbolini/http.git", branch = "bytes06", optional = true }
|
http = { git = "https://github.com/fakeshadow/http.git", optional = true }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
# FIXME: Use release version
|
# FIXME: Use release version
|
||||||
trust-dns-proto = { git = "https://github.com/bluejekyll/trust-dns", branch = "main", default-features = false, features = ["tokio-runtime"] }
|
trust-dns-proto = { git = "https://github.com/bluejekyll/trust-dns", branch = "main", default-features = false, features = ["tokio-runtime"] }
|
||||||
|
|
|
@ -112,3 +112,29 @@ fn join_current_arbiter() {
|
||||||
"local_join should await only for the already spawned futures"
|
"local_join should await only for the already spawned futures"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn non_static_block_on() {
|
||||||
|
let string = String::from("test_str");
|
||||||
|
let str = string.as_str();
|
||||||
|
|
||||||
|
let sys = actix_rt::System::new("borrow some");
|
||||||
|
|
||||||
|
sys.block_on(async {
|
||||||
|
actix_rt::time::sleep(Duration::from_millis(1)).await;
|
||||||
|
assert_eq!("test_str", str);
|
||||||
|
});
|
||||||
|
|
||||||
|
let rt = actix_rt::Runtime::new().unwrap();
|
||||||
|
|
||||||
|
rt.block_on(async {
|
||||||
|
actix_rt::time::sleep(Duration::from_millis(1)).await;
|
||||||
|
assert_eq!("test_str", str);
|
||||||
|
});
|
||||||
|
|
||||||
|
actix_rt::System::run(|| {
|
||||||
|
assert_eq!("test_str", str);
|
||||||
|
actix_rt::System::current().stop();
|
||||||
|
})
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
|
@ -188,11 +188,8 @@ impl<T: ServiceFactory> PipelineFactory<T> {
|
||||||
Error = T::Error,
|
Error = T::Error,
|
||||||
Config = T::Config,
|
Config = T::Config,
|
||||||
InitError = T::InitError,
|
InitError = T::InitError,
|
||||||
Service = impl Service<
|
Service = impl Service<Request = T::Request, Response = U::Response, Error = T::Error>
|
||||||
Request = T::Request,
|
+ Clone,
|
||||||
Response = U::Response,
|
|
||||||
Error = T::Error,
|
|
||||||
> + Clone,
|
|
||||||
> + Clone,
|
> + Clone,
|
||||||
>
|
>
|
||||||
where
|
where
|
||||||
|
@ -259,11 +256,8 @@ impl<T: ServiceFactory> PipelineFactory<T> {
|
||||||
Error = T::Error,
|
Error = T::Error,
|
||||||
Config = T::Config,
|
Config = T::Config,
|
||||||
InitError = T::InitError,
|
InitError = T::InitError,
|
||||||
Service = impl Service<
|
Service = impl Service<Request = T::Request, Response = U::Response, Error = T::Error>
|
||||||
Request = T::Request,
|
+ Clone,
|
||||||
Response = U::Response,
|
|
||||||
Error = T::Error,
|
|
||||||
> + Clone,
|
|
||||||
> + Clone,
|
> + Clone,
|
||||||
>
|
>
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in New Issue