/// check that each char in the slice is either:
/// 1. `%x21`, or
/// 2. in the range `%x23` to `%x7E`, or
/// 3. above `%x80`
check that each char in the slice is either:
1.
check that each char in the slice is either : 1 .
fn check_slice_validity(slice: &[u8]) -> bool {
    slice.iter().all(|&c| {
        // HeaderValue already validates that this doesnt contain control
        // characters, so we only need to look for DQUOTE (`"`).
        //
        // The debug_assert is just in case we use check_slice_validity in
        // some new context that didnt come from a HeaderValue.
        debug_assert!(
            (c >= b'\x21' && c <= b'\x7e') | (c >= b'\x80'),
            "EntityTag expects HeaderValue to have check for control characters"
        );
        c != b'"'
    })
}
fn check_slice_validity ( slice : & [ u8 ] ) -> bool { slice . iter ( ) . all ( | & c | { // HeaderValue already validates that this doesnt contain control // characters, so we only need to look for DQUOTE (`"`). // // The debug_assert is just in case we use check_slice_validity in // some new context that didnt come from a HeaderValue. debug_assert ! ( ( c b'\x21' c b'\x7e' ) ( c b'\x80' ) " " ) ; c != b'"' } ) }
check that each char in the slice is either:
1.
check that each char in the slice is either : 1 .
slice
&[u8]