Skip to content

Commit

Permalink
fix: fix Resource::get_best_key (eclipse-zenoh#1754)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo authored Feb 4, 2025
1 parent e17de41 commit e4ea6f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zenoh/src/net/routing/dispatcher/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ impl Resource {
if suffix.is_empty() {
return None;
}
let (chunk, remain) = suffix.split_once('/').unwrap_or((suffix, ""));
let (chunk, remain) = suffix.split_at(suffix.find('/').unwrap_or(suffix.len()));
let child = prefix.children.get(chunk)?;
get_best_child_key(child, remain, sid)
.or_else(|| get_wire_expr(child, || remain.into(), sid))
Expand Down

0 comments on commit e4ea6f0

Please sign in to comment.