pub unsafe fn decode_unchecked(s: &[u8]) -> Option<Vec<u8>> {
    // Skip bytes that are not '%'.
    let i = match s.iter().position(|&x| x == b'%') {
        Some(i) => i,
        None => return None,
    };
    // SAFETY: `i` cannot exceed `s.len()` since `i < s.len()`.
    let mut buf = unsafe { copy_new(s, i, false) };

    // SAFETY: The caller must ensure that the string is properly encoded.
    unsafe { _decode(s, i, &mut buf, false).unwrap() }
    Some(buf)
}
/// Decodes a percent-encoded string assuming validity.
///
/// # Safety
///
/// This function does not check that the string is properly encoded.
/// Any invalid encoded octet in the string will result in undefined behavior.
Decodes a percent-encoded string assuming validity.
Decodes a percent - encoded string assuming validity .
pub unsafe fn decode_unchecked(s: &[u8]) -> Option<Vec<u8>> {
    // Skip bytes that are not '%'.
    let i = match s.iter().position(|&x| x == b'%') {
        Some(i) => i,
        None => return None,
    };
    // SAFETY: `i` cannot exceed `s.len()` since `i < s.len()`.
    let mut buf = unsafe { copy_new(s, i, false) };
    // SAFETY: The caller must ensure that the string is properly encoded.
    unsafe { _decode(s, i, &mut buf, false).unwrap() }
    Some(buf)
}
pub unsafe fn decode_unchecked ( s : & [ u8 ] ) -> Option < Vec < u8 > > { // Skip bytes that are not '%'. let i = match s . iter ( ) . position ( | & x | x == b'%' ) { Some ( i ) => i , None => return None , } ; // SAFETY: `i` cannot exceed `s.len()` since `i < s.len()`. let mut buf = unsafe { copy_new ( s , i , false ) } ; // SAFETY: The caller must ensure that the string is properly encoded. unsafe { _decode ( s , i , & mut buf , false ) . unwrap ( ) } Some ( buf ) }
Decodes a percent-encoded string assuming validity.
Decodes a percent - encoded string assuming validity .
s
&[u8]
s
&[u8]
safety
This function does not check that the string is properly encoded.
Any invalid encoded octet in the string will result in undefined behavior.
This function does not check that the string is properly encoded . Any invalid encoded octet in the string will result in undefined behavior .