Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Dec 20, 2023
1 parent f5fbeec commit 1381491
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions pallas-network/src/miniprotocols/keepalive/client.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::fmt::Debug;
use rand::Rng;
use std::fmt::Debug;
use thiserror::*;
use tracing::debug;

Expand Down Expand Up @@ -35,7 +35,11 @@ pub struct Client(State, multiplexer::ChannelBuffer, KeepAliveSharedState);

impl Client {
pub fn new(channel: multiplexer::AgentChannel) -> Self {
Self(State::Client, multiplexer::ChannelBuffer::new(channel), KeepAliveSharedState{ saved_cookie: 0 })
Self(
State::Client,
multiplexer::ChannelBuffer::new(channel),
KeepAliveSharedState { saved_cookie: 0 },
)
}

pub fn state(&self) -> &State {
Expand Down
6 changes: 3 additions & 3 deletions pallas-network/src/miniprotocols/keepalive/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ impl Encode<()> for Message {
Message::KeepAlive(cookie) => {
e.array(2)?.u16(0)?;
e.encode(cookie)?;
},
}
Message::ResponseKeepAlive(cookie) => {
e.array(2)?.u16(1)?;
e.encode(cookie)?;
},
}
Message::Done => {
e.array(1)?.u16(2)?;
},
}
}

Ok(())
Expand Down

0 comments on commit 1381491

Please sign in to comment.