Skip to content

Commit

Permalink
Fix "box_default" lint error
Browse files Browse the repository at this point in the history
Signed-off-by: Shawn T. Amundson <[email protected]>
  • Loading branch information
vaporos committed Jan 29, 2024
1 parent 5be2cf7 commit cdaf898
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion splinterd/src/node/builder/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl NetworkSubsystemBuilder {
.take()
.unwrap_or(DEFAULT_HEARTBEAT_INTERVAL);

let transport = MultiTransport::new(vec![Box::new(TcpTransport::default())]);
let transport = MultiTransport::new(vec![Box::<TcpTransport>::default()]);

Ok(RunnableNetworkSubsystem {
node_id,
Expand Down
4 changes: 2 additions & 2 deletions splinterd/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn build_transport(config: &Config) -> Result<MultiTransport, GetTransportEr
let mut transports: Vec<SendableTransport> = vec![
// add tcp transport
// this will be default for endpoints without a prefix
Box::new(TcpTransport::default()),
Box::<TcpTransport>::default(),
];

// add web socket transport
Expand All @@ -57,7 +57,7 @@ pub fn build_transport(config: &Config) -> Result<MultiTransport, GetTransportEr
)?));
} else {
#[cfg(feature = "ws-transport")]
transports.push(Box::new(WsTransport::default()));
transports.push(Box::<WsTransport>::default());
}

Ok(MultiTransport::new(transports))
Expand Down

0 comments on commit cdaf898

Please sign in to comment.