diff --git a/commons/zenoh-keyexpr/src/key_expr/intersect/classical.rs b/commons/zenoh-keyexpr/src/key_expr/intersect/classical.rs index fa346a2d4a..a4eab85bae 100644 --- a/commons/zenoh-keyexpr/src/key_expr/intersect/classical.rs +++ b/commons/zenoh-keyexpr/src/key_expr/intersect/classical.rs @@ -89,9 +89,9 @@ fn it_intersect(mut it1: &[u8], mut it2: &[u8]) -> bool { if advanced1.is_empty() { return !it2.has_verbatim(); } - return (!unsafe { current2.has_direct_verbatim_non_empty() } - && it_intersect::(it1, advanced2)) - || it_intersect::(advanced1, it2); + return it_intersect::(advanced1, it2) + || (!unsafe { current2.has_direct_verbatim_non_empty() } + && it_intersect::(it1, advanced2)); } (_, b"**") => { if advanced2.is_empty() {