Skip to content

Commit

Permalink
fix: refactored code as suggested by clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilayat-Ali committed Oct 5, 2023
1 parent 0a929a2 commit 2c87dcf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rumqttc/src/mqttbytes/topic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn matches(topic: &str, filter: &str) -> bool {
// filter = a/b/c/d should not match topic = a/b/c
let top = topics.next();
match top {
Some(t) if t == "#" => return false,
Some("#") => return false,
Some(_) if f == "+" => continue,
Some(t) if f != t => return false,
Some(_) => continue,
Expand Down
2 changes: 1 addition & 1 deletion rumqttc/src/v5/mqttbytes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub fn matches(topic: &str, filter: &str) -> bool {
// filter = a/b/c/d should not match topic = a/b/c
let top = topics.next();
match top {
Some(t) if t == "#" => return false,
Some("#") => return false,
Some(_) if f == "+" => continue,
Some(t) if f != t => return false,
Some(_) => continue,
Expand Down

0 comments on commit 2c87dcf

Please sign in to comment.