refactor: misc clippy suggestions

This commit is contained in:
Greg Heartsfield
2022-09-24 09:19:16 -05:00
parent a98708ba47
commit bef7ca7e27
4 changed files with 16 additions and 8 deletions
+5 -1
View File
@@ -60,6 +60,10 @@ impl ClientConn {
}
/// Add a new subscription for this connection.
/// # Errors
///
/// Will return `Err` if the client has too many subscriptions, or
/// if the provided name is excessively long.
pub fn subscribe(&mut self, s: Subscription) -> Result<()> {
let k = s.get_id();
let sub_id_len = k.len();
@@ -94,7 +98,7 @@ impl ClientConn {
}
/// Remove the subscription for this connection.
pub fn unsubscribe(&mut self, c: Close) {
pub fn unsubscribe(&mut self, c: &Close) {
// TODO: return notice if subscription did not exist.
self.subscriptions.remove(&c.id);
debug!(