eclipse / paho.mqtt.rust

paho.mqtt.rust
Other
516 stars 102 forks source link

topic filter is_match appears to be wrong #167

Closed pabigot closed 1 year ago

pabigot commented 2 years ago

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 commented 2 years ago

Yeah, that's definitely wrong!