diff --git a/rpc/src/client/transport/http.rs b/rpc/src/client/transport/http.rs index 3952285e5..6bb8f092c 100644 --- a/rpc/src/client/transport/http.rs +++ b/rpc/src/client/transport/http.rs @@ -15,7 +15,7 @@ use super::auth; use crate::prelude::*; use crate::{ client::{Client, CompatMode}, - dialect::{latest, v0_34, Dialect}, + dialect::{v0_34, Dialect, LatestDialect}, endpoint, query::Query, request::RequestMessage, @@ -197,7 +197,7 @@ impl Client for HttpClient { where R: SimpleRequest, { - self.perform_with_dialect(request, latest::Dialect).await + self.perform_with_dialect(request, LatestDialect).await } async fn block_results(&self, height: H) -> Result diff --git a/rpc/src/client/transport/websocket.rs b/rpc/src/client/transport/websocket.rs index 7c77d7192..ce3738f63 100644 --- a/rpc/src/client/transport/websocket.rs +++ b/rpc/src/client/transport/websocket.rs @@ -32,7 +32,7 @@ use crate::{ transport::router::{PublishResult, SubscriptionRouter}, Client, CompatMode, }, - dialect::{latest, v0_34, Dialect}, + dialect::{v0_34, Dialect, LatestDialect}, endpoint::{self, subscribe, unsubscribe}, error::Error, event::{self, Event}, @@ -235,7 +235,7 @@ impl Client for WebSocketClient { where R: SimpleRequest, { - self.perform_with_dialect(request, latest::Dialect).await + self.perform_with_dialect(request, LatestDialect).await } async fn block_results(&self, height: H) -> Result diff --git a/rpc/src/dialect.rs b/rpc/src/dialect.rs index 76f357dfa..4d33a409e 100644 --- a/rpc/src/dialect.rs +++ b/rpc/src/dialect.rs @@ -3,7 +3,7 @@ pub mod v0_34; pub mod v0_37; -pub use v0_37 as latest; +pub use v0_37::Dialect as LatestDialect; mod begin_block; mod check_tx; @@ -24,8 +24,6 @@ pub trait Dialect: sealed::Sealed + Default + Clone + Send + Sync { type Evidence: From + Serialize + DeserializeOwned + Send; } -pub type LatestDialect = v0_37::Dialect; - mod sealed { pub trait Sealed {} diff --git a/rpc/src/request.rs b/rpc/src/request.rs index 462607b99..684746479 100644 --- a/rpc/src/request.rs +++ b/rpc/src/request.rs @@ -5,7 +5,7 @@ use core::fmt::Debug; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use super::{Id, Method, Version}; -use crate::dialect::{latest, Dialect}; +use crate::dialect::{Dialect, LatestDialect}; use crate::{prelude::*, Error}; /// Serialization for JSON-RPC requests @@ -26,7 +26,7 @@ pub trait RequestMessage: DeserializeOwned + Serialize + Sized { } /// JSON-RPC requests -pub trait Request: RequestMessage + Send { +pub trait Request: RequestMessage + Send { /// Response type for this command type Response: super::response::Response; } @@ -39,7 +39,7 @@ pub trait Request: RequestMessage + Send { /// simple, singular response. /// /// [`Subscription`]: struct.Subscription.html -pub trait SimpleRequest: Request { +pub trait SimpleRequest: Request { /// The output data, converted from Response. type Output: From; }