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 3feec52
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 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,11 @@ 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 3feec52

Please sign in to comment.