Last active
November 18, 2019 12:13
-
-
Save Nemo157/7fb644b8ae222bf0159ab8a33ff67978 to your computer and use it in GitHub Desktop.
hyper on async-std
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is automatically @generated by Cargo. | |
# It is not intended for manual editing. | |
[[package]] | |
name = "async-macros" | |
version = "1.0.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "async-std" | |
version = "1.0.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"async-macros 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"async-task 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", | |
"crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-timer 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
"kv-log-macro 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", | |
"num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "async-task" | |
version = "1.0.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "autocfg" | |
version = "0.1.7" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "bitflags" | |
version = "1.2.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "byteorder" | |
version = "1.3.2" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "bytes" | |
version = "0.4.12" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "cfg-if" | |
version = "0.1.10" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "crossbeam-channel" | |
version = "0.3.9" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "crossbeam-deque" | |
version = "0.7.2" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "crossbeam-epoch" | |
version = "0.8.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", | |
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "crossbeam-utils" | |
version = "0.6.6" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "crossbeam-utils" | |
version = "0.7.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", | |
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "fnv" | |
version = "1.0.6" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "fuchsia-zircon" | |
version = "0.3.3" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "fuchsia-zircon-sys" | |
version = "0.3.3" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "futures-channel-preview" | |
version = "0.3.0-alpha.19" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "futures-core" | |
version = "0.3.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "futures-core-preview" | |
version = "0.3.0-alpha.19" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "futures-io" | |
version = "0.3.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "futures-sink-preview" | |
version = "0.3.0-alpha.19" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "futures-timer" | |
version = "1.0.3" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "futures-util-preview" | |
version = "0.3.0-alpha.19" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "h2" | |
version = "0.2.0-alpha.3" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", | |
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-codec 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "hermit-abi" | |
version = "0.1.3" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "http" | |
version = "0.1.19" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", | |
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "http-body" | |
version = "0.2.0-alpha.3" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", | |
"http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "httparse" | |
version = "1.3.4" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "hyper" | |
version = "0.13.0-alpha.4" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"h2 0.2.0-alpha.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
"http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"http-body 0.2.0-alpha.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
"httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"pin-project 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", | |
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tower-make 0.3.0-alpha.2a (registry+https://github.com/rust-lang/crates.io-index)", | |
"tower-service 0.3.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "hyper-on-async-std" | |
version = "0.1.0" | |
dependencies = [ | |
"async-std 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"hyper 0.13.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "indexmap" | |
version = "1.3.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "iovec" | |
version = "0.1.4" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "itoa" | |
version = "0.4.4" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "kernel32-sys" | |
version = "0.2.2" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "kv-log-macro" | |
version = "1.0.4" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "lazy_static" | |
version = "1.4.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "libc" | |
version = "0.2.65" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "log" | |
version = "0.4.8" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "memchr" | |
version = "2.2.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "memoffset" | |
version = "0.5.3" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "mio" | |
version = "0.6.19" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
"iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", | |
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", | |
"slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "mio-uds" | |
version = "0.6.7" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", | |
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", | |
"mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "miow" | |
version = "0.2.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", | |
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "net2" | |
version = "0.2.33" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", | |
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", | |
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "num_cpus" | |
version = "1.11.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", | |
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "once_cell" | |
version = "1.2.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "pin-project" | |
version = "0.4.5" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"pin-project-internal 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "pin-project-internal" | |
version = "0.4.5" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "pin-project-lite" | |
version = "0.1.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "pin-utils" | |
version = "0.1.0-alpha.4" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "proc-macro2" | |
version = "1.0.6" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "quote" | |
version = "1.0.2" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "redox_syscall" | |
version = "0.1.56" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "rustc_version" | |
version = "0.2.3" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "scopeguard" | |
version = "1.0.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "semver" | |
version = "0.9.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "semver-parser" | |
version = "0.7.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "slab" | |
version = "0.4.2" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "string" | |
version = "0.2.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "syn" | |
version = "1.0.8" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "time" | |
version = "0.1.42" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", | |
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", | |
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "tokio-codec" | |
version = "0.2.0-alpha.6" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "tokio-executor" | |
version = "0.2.0-alpha.6" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "tokio-io" | |
version = "0.2.0-alpha.6" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
"pin-project 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "tokio-sync" | |
version = "0.2.0-alpha.6" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "tower-make" | |
version = "0.3.0-alpha.2a" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", | |
"tower-service 0.3.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "tower-service" | |
version = "0.3.0-alpha.2" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "try-lock" | |
version = "0.2.2" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "unicode-xid" | |
version = "0.2.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "want" | |
version = "0.3.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "winapi" | |
version = "0.2.8" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "winapi" | |
version = "0.3.8" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[[package]] | |
name = "winapi-build" | |
version = "0.1.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "winapi-i686-pc-windows-gnu" | |
version = "0.4.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "winapi-x86_64-pc-windows-gnu" | |
version = "0.4.0" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
[[package]] | |
name = "ws2_32-sys" | |
version = "0.2.1" | |
source = "registry+https://github.com/rust-lang/crates.io-index" | |
dependencies = [ | |
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", | |
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", | |
] | |
[metadata] | |
"checksum async-macros 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e421d59b24c1feea2496e409b3e0a8de23e5fc130a2ddc0b012e551f3b272bba" | |
"checksum async-std 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6ee33a6cfdd96bfde032d14b29905244a70868bd8dda1f3b13504d6cbc3b7bc" | |
"checksum async-task 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de6bd58f7b9cc49032559422595c81cbfcf04db2f2133592f70af19e258a1ced" | |
"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" | |
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" | |
"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" | |
"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" | |
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" | |
"checksum crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" | |
"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" | |
"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" | |
"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" | |
"checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" | |
"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" | |
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" | |
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" | |
"checksum futures-channel-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a" | |
"checksum futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "79564c427afefab1dfb3298535b21eda083ef7935b4f0ecbfcb121f0aec10866" | |
"checksum futures-core-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a" | |
"checksum futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e676577d229e70952ab25f3945795ba5b16d63ca794ca9d2c860e5595d20b5ff" | |
"checksum futures-sink-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "86f148ef6b69f75bb610d4f9a2336d4fc88c4b5b67129d1a340dd0fd362efeec" | |
"checksum futures-timer 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7946248e9429ff093345d3e8fdf4eb0f9b2d79091611c9c14f744971a6f8be45" | |
"checksum futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" | |
"checksum h2 0.2.0-alpha.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0f107db1419ef8271686187b1a5d47c6431af4a7f4d98b495e7b7fc249bb0a78" | |
"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" | |
"checksum http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d7e06e336150b178206af098a055e3621e8336027e2b4d126bda0bc64824baaf" | |
"checksum http-body 0.2.0-alpha.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1f3aef6f3de2bd8585f5b366f3f550b5774500b4764d00cf00f903c95749eec3" | |
"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" | |
"checksum hyper 0.13.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2d05aa523087ac0b9d8b93dd80d5d482a697308ed3b0dca7b0667511a7fa7cdc" | |
"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" | |
"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" | |
"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" | |
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" | |
"checksum kv-log-macro 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c54d9f465d530a752e6ebdc217e081a7a614b48cb200f6f0aee21ba6bc9aabb" | |
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | |
"checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" | |
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" | |
"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" | |
"checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" | |
"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" | |
"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" | |
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" | |
"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" | |
"checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" | |
"checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed" | |
"checksum pin-project 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c5fce7042b4e4338a3f868e563fff394709c3ff62cf6908d407dd9e2caff96ed" | |
"checksum pin-project-internal 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7644b4721cc27235f667e735da8732f5b781c442157315674c0cb7f28b4cabf3" | |
"checksum pin-project-lite 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f0af6cbca0e6e3ce8692ee19fb8d734b641899e07b68eb73e9bbbd32f1703991" | |
"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" | |
"checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" | |
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" | |
"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" | |
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" | |
"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" | |
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" | |
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" | |
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | |
"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" | |
"checksum syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "661641ea2aa15845cddeb97dad000d22070bb5c1fb456b96c1cba883ec691e92" | |
"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" | |
"checksum tokio-codec 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9f5d22fd1e84bd4045d28813491cb7d7caae34d45c80517c2213f09a85e8787a" | |
"checksum tokio-executor 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8" | |
"checksum tokio-io 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "112784d5543df30660b04a72ca423bfbd90e8bb32f94dcf610f15401218b22c5" | |
"checksum tokio-sync 0.2.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2" | |
"checksum tower-make 0.3.0-alpha.2a (registry+https://github.com/rust-lang/crates.io-index)" = "316d47dd40cde4ac5d88110eaf9a10a4e2a68612d9c056cd2aa24e37dcb484cd" | |
"checksum tower-service 0.3.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)" = "63ff37396cd966ce43bea418bfa339f802857495f797dafa00bea5b7221ebdfa" | |
"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" | |
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" | |
"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" | |
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" | |
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" | |
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" | |
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" | |
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | |
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "hyper-on-async-std" | |
version = "0.1.0" | |
authors = ["Wim Looman <[email protected]>"] | |
edition = "2018" | |
[[bin]] | |
name = "hyper-on-async-std" | |
path = "main.rs" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
async-std = { version = "1.0.1", default-features = false, features = ["default"] } | |
hyper = { version = "=0.13.0-alpha.4", default-features = false } | |
tokio-executor = { version = "=0.2.0-alpha.6", default-features = false } | |
tokio-io = "0.2.0-alpha.6" | |
futures-io = "0.3.1" | |
futures-core = "0.3.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use futures_core::Stream; | |
use futures_io::{AsyncRead, AsyncWrite}; | |
use std::{ | |
future::Future, | |
io, | |
pin::Pin, | |
task::{Context, Poll}, | |
}; | |
struct Compat<T>(T); | |
impl<T> Compat<T> { | |
fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T> { | |
unsafe { Pin::new_unchecked(&mut Pin::get_unchecked_mut(self).0) } | |
} | |
} | |
impl<'a> hyper::server::accept::Accept for Compat<async_std::net::Incoming<'a>> { | |
type Conn = Compat<async_std::net::TcpStream>; | |
type Error = io::Error; | |
fn poll_accept( | |
self: Pin<&mut Self>, | |
cx: &mut Context<'_>, | |
) -> Poll<Option<Result<Self::Conn, Self::Error>>> { | |
self.get_pin_mut() | |
.poll_next(cx) | |
.map(|o| o.map(|r| r.map(Compat))) | |
} | |
} | |
impl tokio_io::AsyncWrite for Compat<async_std::net::TcpStream> { | |
fn poll_write(self: Pin<&mut Self>, cx: &mut Context, buf: &[u8]) -> Poll<io::Result<usize>> { | |
self.get_pin_mut().poll_write(cx, buf) | |
} | |
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> { | |
self.get_pin_mut().poll_flush(cx) | |
} | |
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context) -> Poll<io::Result<()>> { | |
self.get_pin_mut().poll_close(cx) | |
} | |
} | |
impl tokio_io::AsyncRead for Compat<async_std::net::TcpStream> { | |
fn poll_read( | |
self: Pin<&mut Self>, | |
cx: &mut Context, | |
buf: &mut [u8], | |
) -> Poll<io::Result<usize>> { | |
self.get_pin_mut().poll_read(cx, buf) | |
} | |
} | |
#[derive(Copy, Clone)] | |
struct AsyncStdExecutor; | |
impl tokio_executor::Executor for AsyncStdExecutor { | |
fn spawn( | |
&mut self, | |
future: Pin<Box<dyn Future<Output = ()> + Send>>, | |
) -> Result<(), tokio_executor::SpawnError> { | |
async_std::task::spawn(future); | |
Ok(()) | |
} | |
} | |
impl<T> tokio_executor::TypedExecutor<T> for AsyncStdExecutor | |
where | |
T: Future + Send + 'static, | |
T::Output: Send + 'static, | |
{ | |
fn spawn(&mut self, future: T) -> Result<(), tokio_executor::SpawnError> { | |
async_std::task::spawn(future); | |
Ok(()) | |
} | |
} | |
fn main() -> io::Result<()> { | |
async_std::task::block_on(async { | |
let listener = async_std::net::TcpListener::bind("127.0.0.1:8080").await?; | |
let make_svc = hyper::service::make_service_fn(|_| { | |
async { | |
Ok::<_, io::Error>(hyper::service::service_fn(|_| { | |
async { | |
Ok::<_, io::Error>(hyper::Response::new(hyper::Body::from("Hello World"))) | |
} | |
})) | |
} | |
}); | |
let service = hyper::Server::builder(Compat(listener.incoming())) | |
.executor(AsyncStdExecutor) | |
.serve(make_svc); | |
service | |
.await | |
.map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; | |
Ok(()) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment