fn fb_path(path: &[&str]) -> String {
    let mut first = true;
    path.iter().fold(String::new(), |mut a, b| {
        a.reserve((if b.is_empty() {1} else {b.len()}) + (if first {0} else {1}));
        if !first { a.push_str("/") };
        first = false;
        a.push_str(if b.is_empty() {"_"} else {b});
        a
    })
}
/// Concatenates parts of a Firebase API URL properly.
/// 
/// (Why: for example, "" parts don't create entries, so the tree would become messed up without special handling as in here.)
/// 
/// ```
/// assert_eq!(&fb_path(&["a", "", "c"]), "a/_/c");
/// ```
Concatenates parts of a Firebase API URL properly.
(Why: for example, "" parts don't create entries, so the tree would become messed up without special handling as in here.)


Concatenates parts of a Firebase API URL properly . ( Why : for example " " parts don ' t create entries so the tree would become messed up without special handling as in here . )
fn fb_path(path: &[&str]) -> String {
    let mut first = true;
    path.iter().fold(String::new(), |mut a, b| {
        a.reserve((if b.is_empty() {1} else {b.len()}) + (if first {0} else {1}));
        if !first { a.push_str("/") };
        first = false;
        a.push_str(if b.is_empty() {"_"} else {b});
        a
    })
}
fn fb_path ( path : & [ & str ] ) -> String { let mut first = true ; path . iter ( ) . fold ( String :: new ( ) , | mut a , b | { a . reserve ( ( if b . is_empty ( ) { 1 } else { b . len ( ) } ) + ( if first { 0 } else { 1 } ) ) ; if ! first { a . push_str ( " " ) } ; first = false ; a . push_str ( if b . is_empty ( ) { " " } else { b } ) ; a } ) }
Concatenates parts of a Firebase API URL properly.
Concatenates parts of a Firebase API URL properly .
path
&[&str]
path
&[&str]