Skip to content

Commit

Permalink
remove explicit native-tls dependency (#450)
Browse files Browse the repository at this point in the history
`native-tls` is actually only an implicit dependency
which might change in the future.
  • Loading branch information
toxeus committed Jan 18, 2021
1 parent 7422970 commit 94c5c4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ tokio = { version = "0.2", optional = true, features = ["full"] }
tokio-util = { version = "0.6", optional = true, features = ["compat"] }
soketto = { version = "0.4.1", optional = true }
## Shared (WS, HTTP)
native-tls = { version = "0.2", optional = true }
url = { version = "2.1", optional = true }
## EIP-1193
js-sys = { version = "0.3.45", optional = true }
Expand All @@ -65,12 +64,12 @@ tokio = { version = "0.2", features = ["full"] }
default = ["http-tls", "signing", "ws-tls-tokio", "ipc-tokio"]
eip-1193 = ["js-sys", "wasm-bindgen", "wasm-bindgen-futures", "futures-timer/wasm-bindgen", "rand", "getrandom"]
http = ["hyper", "hyper-proxy", "url", "base64", "typed-headers"]
http-tls = ["hyper-tls", "native-tls", "http"]
http-tls = ["hyper-tls", "http"]
signing = ["secp256k1"]
ws-tokio = ["soketto", "url", "tokio", "tokio-util"]
ws-async-std = ["soketto", "url", "async-std"]
ws-tls-tokio = ["async-native-tls", "native-tls", "async-native-tls/runtime-tokio", "ws-tokio"]
ws-tls-async-std = ["async-native-tls", "native-tls", "async-native-tls/runtime-async-std", "ws-async-std"]
ws-tls-tokio = ["async-native-tls", "async-native-tls/runtime-tokio", "ws-tokio"]
ws-tls-async-std = ["async-native-tls", "async-native-tls/runtime-async-std", "ws-async-std"]
ipc-tokio = ["tokio"]
test = []

Expand Down
6 changes: 3 additions & 3 deletions src/transports/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ impl From<url::ParseError> for crate::Error {
}
}

#[cfg(feature = "native-tls")]
impl From<native_tls::Error> for crate::Error {
fn from(err: native_tls::Error) -> Self {
#[cfg(feature = "async-native-tls")]
impl From<async_native_tls::Error> for crate::Error {
fn from(err: async_native_tls::Error) -> Self {
crate::Error::Transport(format!("{:?}", err))
}
}
Expand Down

0 comments on commit 94c5c4b

Please sign in to comment.