Skip to content

Commit

Permalink
fix: clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
swanandx committed Sep 3, 2023
1 parent 0874e55 commit 1aa3af1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 1 addition & 7 deletions rumqttd/src/link/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,12 @@ impl<P: Protocol> RemoteLink<P> {
let clean_session = connect.clean_session;

let topic_alias_max = props.as_ref().and_then(|p| p.topic_alias_max);
let session_expiry = props
.as_ref()
.and_then(|p| p.session_expiry_interval)
.unwrap_or(0);

let delay_interval = lastwill_props
.as_ref()
.and_then(|f| f.delay_interval)
.unwrap_or(0);

let topic_alias_max = props.as_ref().and_then(|p| p.topic_alias_max);

// If session expiry interval is absent, use 0 as default.
let session_expiry_interval = props
.as_ref()
Expand All @@ -97,7 +91,7 @@ impl<P: Protocol> RemoteLink<P> {

// The Server delays publishing the Client’s Will Message until
// the Will Delay Interval has passed or the Session ends, whichever happens first
let will_delay_interval = min(session_expiry, delay_interval);
let will_delay_interval = min(session_expiry_interval, delay_interval);

let (link_tx, link_rx, notification) = LinkBuilder::new(client_id, router_tx)
.tenant_id(tenant_id)
Expand Down
2 changes: 2 additions & 0 deletions rumqttd/src/router/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ pub struct Connection {

impl Connection {
/// Create connection state to hold identifying information of connecting device
// TODO: use builder pattern or something else to fix this lint
#[allow(clippy::too_many_arguments)]
pub fn new(
tenant_id: Option<String>,
client_id: String,
Expand Down

0 comments on commit 1aa3af1

Please sign in to comment.