zookeeper-async 5.0.0

An async ZooKeeper client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Combine two paths into a single path, possibly inserting a '/' between them.
pub fn make_path(parent: &str, child: &str) -> String {
    if parent.ends_with('/') {
        format!("{}{}", parent, child)
    } else {
        format!("{}/{}", parent, child)
    }
}

#[cfg(test)]
#[test]
fn make_path_tests() {
    assert_eq!("/a/b", make_path("/a", "b"));
    assert_eq!("/a/b", make_path("/a/", "b"));
}