Closed leric closed 3 years ago
The extensions were never Clone
. Are you sure this problem is with http
?
It strange, only my local cached code somehow got modified, looks like this:
/// A type map of protocol extensions.
///
/// `Extensions` can be used by `Request` and `Response` to store
/// extra data derived from the underlying protocol.
#[derive(Default, Clone)]
pub struct Extensions {
// If extensions are never used, no need to carry around an empty HashMap.
// That's 3 words. Instead, this is only 1 word.
map: Option<Box<AnyMap>>,
}
Delete the cached folder fixed the problem.
Sorry for bothering.
Update to v0.2.3 cause build error on macos:
Set version back to v0.2.2 in Cargo.yaml
http = "=0.2.2"
can fix this for now.v0.2.3 works fine on Linux.
Env
MacOS 11.2 Rust 1.50.0 hyper 0.14.4 tungstenite 0.13