Skip to content

Commit

Permalink
chore: new fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Evalir committed Dec 6, 2023
1 parent efaa944 commit 1924689
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/common/src/alloy_runtime_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ impl ::core::fmt::Display for RuntimeTransport {
}

impl RuntimeTransport {
/// Create a new, unconnected transport.
pub fn new(url: Url) -> Self {
Self {
inner: Arc::new(RwLock::new(None)),
url,
}
}

/// Connect to the runtime transport, depending on the URL scheme.
async fn connect(&self) -> Result<InnerTransport, RuntimeTransportError> {
match self.url.scheme() {
Expand Down

0 comments on commit 1924689

Please sign in to comment.