Skip to content

Commit

Permalink
refactor: rename to boxed
Browse files Browse the repository at this point in the history
  • Loading branch information
prestwich committed Aug 19, 2023
1 parent 7f8923b commit 047ba1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/transports/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use alloy_json_rpc::{Id, JsonRpcRequest, RpcParam, RpcReturn};
use serde_json::value::RawValue;
use tower::{util::BoxCloneService, Layer, ServiceBuilder};
use tower::{layer::util::Stack, util::BoxCloneService, Layer, ServiceBuilder};

use std::{
borrow::Cow,
Expand Down Expand Up @@ -74,7 +74,7 @@ where

/// Type erase the transport, allowing it to be used in a generic context.
#[inline]
pub fn type_erased(
pub fn boxed_service(
self,
) -> RpcClient<BoxCloneService<Box<RawValue>, Box<RawValue>, TransportError>> {
RpcClient {
Expand All @@ -90,7 +90,7 @@ pub struct ClientBuilder<L> {
}

impl<L> ClientBuilder<L> {
pub fn layer<M>(self, layer: M) -> ClientBuilder<tower::layer::util::Stack<M, L>> {
pub fn layer<M>(self, layer: M) -> ClientBuilder<Stack<M, L>> {
ClientBuilder {
builder: self.builder.layer(layer),
}
Expand Down
2 changes: 1 addition & 1 deletion crates/transports/src/transports/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub trait Transport:
+ Sync
+ 'static
{
fn erased(self) -> BoxTransport
fn boxed(self) -> BoxTransport
where
Self: Sized + Clone + Send + Sync + 'static,
{
Expand Down

0 comments on commit 047ba1d

Please sign in to comment.