Skip to content

Commit

Permalink
Removes dead code and fixes a few typos (#471)
Browse files Browse the repository at this point in the history
* remove dead code

* typos
  • Loading branch information
lthiery authored Nov 8, 2023
1 parent 78bb188 commit 9e1ae9a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/beaconer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl Beaconer {
self.interval,
);

// Log next beacom time if changed
// Log next beacon time if changed
if Some(new_beacon_time) != self.next_beacon_time {
info!(beacon_time = %new_beacon_time, "next beacon time");
}
Expand Down
11 changes: 0 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,3 @@ macro_rules! impl_verify {
};
}
pub(crate) use impl_verify;

// macro_rules! verify {
// ($key: expr, $msg: expr, $sig: ident) => {{
// let mut _msg = $msg.clone();
// _msg.$sig = vec![];
// let buf = _msg.encode_to_vec();
// $key.verify(&buf, &$msg.$sig).map_err(Error::from)
// }};
// }

// pub(crate) use verify;
2 changes: 1 addition & 1 deletion src/packet_router/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl PacketRouter {
}

async fn handle_reconnect(&mut self) -> Result {
// Do not send waiting packets on ok here since we wait for a sesson
// Do not send waiting packets on ok here since we wait for a session
// offer. Also do not reset the reconnect retry counter since only a
// session key indicates a good connection
self.service
Expand Down
6 changes: 3 additions & 3 deletions src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ impl Settings {

/// Returns the onboarding key for this gateway. The onboarding key is
/// determined by the onboarding setting. If the onbaording setting is not
/// present or there is any error retrievign the onboarding key from the
/// confignred setting the public key of the gateawy is returned.
/// present or there is any error retrieving the onboarding key from the
/// configured setting the public key of the gateway is returned.
pub fn onboarding_key(&self) -> PublicKey {
self.onboarding.as_ref().map_or_else(
|| self.keypair.public_key().to_owned(),
Expand Down Expand Up @@ -312,7 +312,7 @@ mod test {

// Now try URI form
assert_eq!(
Uri::try_from(&ListenAddress::Port(4468)).expect("urifrom port"),
Uri::try_from(&ListenAddress::Port(4468)).expect("uri from port"),
Uri::from_static("http://127.0.0.1:4468")
);
assert_eq!(
Expand Down

0 comments on commit 9e1ae9a

Please sign in to comment.