Skip to content

Commit

Permalink
inline various functions
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Aug 28, 2024
1 parent 493585a commit 5962e93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mm2src/mm2_main/src/lp_healthcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,16 @@ impl HealthcheckMessage {
res
}

#[inline]
pub(crate) fn encode(&self) -> Result<Vec<u8>, rmp_serde::encode::Error> { encode_message(self) }

#[inline]
pub(crate) fn decode(bytes: &[u8]) -> Result<Self, rmp_serde::decode::Error> { decode_message(bytes) }

#[inline]
pub(crate) fn should_reply(&self) -> bool { !self.data.is_a_reply }

#[inline]
pub(crate) fn sender_peer(&self) -> &str { &self.data.sender_peer }
}

Expand Down

0 comments on commit 5962e93

Please sign in to comment.