fn safe_ascii_debug(v: &[u8]) -> String {
    let mut s = String::new();
    for &c in v.iter() {
        if c >= 0x20u8 && c <= 0x7Eu8 && c != 0x5Cu8 {
            s.push(c as char);
        } else {
            s.push('X')
        }
    }
    s
}
//print only safe ascii characters for debugging. In particular don't print shell escapes.
print only safe ascii characters for debugging. In particular don't print shell escapes.
print only safe ascii characters for debugging . In particular don ' t print shell escapes .
fn safe_ascii_debug(v: &[u8]) -> String {
    let mut s = String::new();
    for &c in v.iter() {
        if c >= 0x20u8 && c <= 0x7Eu8 && c != 0x5Cu8 {
            s.push(c as char);
        } else {
            s.push('X')
        }
    }
    s
}
fn safe_ascii_debug ( v : & [ u8 ] ) -> String { let mut s = String :: new ( ) ; for & c in v . iter ( ) { if c >= 0x20u8 && c <= 0x7Eu8 && c != 0x5Cu8 { s . push ( c as char ) ; } else { s . push ( 'X' ) } } s }
print only safe ascii characters for debugging.
print only safe ascii characters for debugging .
v
&[u8]
v
&[u8]