fn escape_to_fmt(s: &str) -> String {
    let mut rslt = String::with_capacity(s.len());
    for c in s.chars() {
        rslt.extend(c.escape_debug());
        match c {
            '{' | '}' => rslt.push(c),
            _ => {}
        }
    }
    rslt
}
/// Escapes to use as a formatting string.
Escapes to use as a formatting string.
Escapes to use as a formatting string .
fn escape_to_fmt(s: &str) -> String {
    let mut rslt = String::with_capacity(s.len());
    for c in s.chars() {
        rslt.extend(c.escape_debug());
        match c {
            '{' | '}' => rslt.push(c),
            _ => {}
        }
    }
    rslt
}
fn escape_to_fmt ( s : & str ) -> String { let mut rslt = String :: with_capacity ( s . len ( ) ) ; for c in s . chars ( ) { rslt . extend ( c . escape_debug ( ) ) ; match c { '{' | '}' => rslt . push ( c ) , _ => { } } } rslt }
Escapes to use as a formatting string.
Escapes to use as a formatting string .
s
&str
s
&str