Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

refactor: make IPC generic over AsyncRead/Write #264

Merged
merged 2 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ethers-providers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ tracing-futures = { version = "0.2.5", default-features = false, features = ["st
tokio = { version = "1.4", default-features = false, optional = true }
tokio-tungstenite = { version = "0.13.0", default-features = false, features = ["connect", "tls"], optional = true }
tokio-util = { version = "0.6.5", default-features = false, features = ["io"], optional = true }
bytes = { version = "1.0.1", default-features = false, optional = true }

[dev-dependencies]
ethers = { version = "0.2", path = "../ethers" }
Expand All @@ -50,4 +51,4 @@ tempfile = "3.2.0"
default = ["ws", "ipc"]
celo = ["ethers-core/celo"]
ws = ["tokio", "tokio-tungstenite"]
ipc = ["tokio", "tokio/io-util", "tokio-util"]
ipc = ["tokio", "tokio/io-util", "tokio-util", "bytes"]
2 changes: 1 addition & 1 deletion ethers-providers/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ impl Provider<crate::Ws> {
impl Provider<crate::Ipc> {
/// Direct connection to an IPC socket.
pub async fn connect_ipc(path: impl AsRef<std::path::Path>) -> Result<Self, ProviderError> {
let ipc = crate::Ipc::new(path).await?;
let ipc = crate::Ipc::connect(path).await?;
Ok(Self::new(ipc))
}
}
Expand Down
Loading