mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
add use_self clippy lint (#8325)
This commit is contained in:
@ -284,7 +284,7 @@ pub struct RpcServiceBuilder<L>(tower::ServiceBuilder<L>);
|
||||
|
||||
impl Default for RpcServiceBuilder<Identity> {
|
||||
fn default() -> Self {
|
||||
RpcServiceBuilder(tower::ServiceBuilder::new())
|
||||
Self(tower::ServiceBuilder::new())
|
||||
}
|
||||
}
|
||||
|
||||
@ -577,7 +577,7 @@ pub struct Builder<HttpMiddleware, RpcMiddleware> {
|
||||
|
||||
impl Default for Builder<Identity, Identity> {
|
||||
fn default() -> Self {
|
||||
Builder {
|
||||
Self {
|
||||
settings: Settings::default(),
|
||||
id_provider: Arc::new(RandomIntegerIdProvider),
|
||||
rpc_middleware: RpcServiceBuilder::new(),
|
||||
|
||||
@ -43,7 +43,7 @@ pub enum Separator {
|
||||
|
||||
impl Default for Separator {
|
||||
fn default() -> Self {
|
||||
Separator::Byte(b'\n')
|
||||
Self::Byte(b'\n')
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,12 +57,12 @@ pub struct StreamCodec {
|
||||
impl StreamCodec {
|
||||
/// Default codec with streaming input data. Input can be both enveloped and not.
|
||||
pub fn stream_incoming() -> Self {
|
||||
StreamCodec::new(Separator::Empty, Default::default())
|
||||
Self::new(Separator::Empty, Default::default())
|
||||
}
|
||||
|
||||
/// New custom stream codec
|
||||
pub fn new(incoming_separator: Separator, outgoing_separator: Separator) -> Self {
|
||||
StreamCodec { incoming_separator, outgoing_separator }
|
||||
Self { incoming_separator, outgoing_separator }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user