Skip to content

Commit

Permalink
neat
Browse files Browse the repository at this point in the history
  • Loading branch information
Murphy-OrangeMud committed Oct 4, 2023
1 parent 2595f15 commit fa67f9a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/src/services/zookeeper/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl ZkAdapter {
path = build_rooted_abs_path("/", path.strip_suffix('/').unwrap_or(&path));
}
let mut rend = path.len();
let res = loop {
loop {
let mut subpath = path.substring(0, rend);
if subpath.is_empty() {
subpath = "/";
Expand All @@ -204,10 +204,7 @@ impl ZkAdapter {
}
},
}
};
if res.is_err() {
return res;
}
}?;
match path.substring(rend + 1, path.len()).find('/') {
Some(len) => {
rend = len + rend + 1;
Expand Down

0 comments on commit fa67f9a

Please sign in to comment.