Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topic filter is_match appears to be wrong #167

Closed
pabigot opened this issue Sep 5, 2022 · 1 comment · Fixed by #166
Closed

topic filter is_match appears to be wrong #167

pabigot opened this issue Sep 5, 2022 · 1 comment · Fixed by #166

Comments

@pabigot
Copy link
Contributor

pabigot commented Sep 5, 2022

Why does this test pass?

#[test]
fn topic() {
    let t = mqtt::topic::TopicFilter::new("dmxlight/dmx1/+").unwrap();
    assert!(t.is_match("dmxlight/dmx1/btf1/set"));
}

Given that the trailing fragment btf1/set contains a delimiter so is not a single-level?

@fpagliughi
Copy link
Contributor

Yeah, that's definitely wrong!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants