You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: percent_decode.rs
    path of file: ./repos/rustybox/libbb
    
    the code of the file until where you have to start completion: use libc;
/*
 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
 */
//kbuild:lib-y += percent_decode.o
unsafe fn hex_to_bin(mut c: libc::c_uchar) -> libc::c_uint {
  let mut v: libc::c_uint = 0;
  v = (c as libc::c_int - '0' as i32) as libc::c_uint;
  if v <= 9i32 as libc::c_uint {
    return v;
  }
  /* c | 0x20: letters to lower case, non-letters
   * to (potentially different) non-letters */
  v = ((c as libc::c_int | 0x20i32) as libc::c_uint).w
    
unsafe fn hex_to_bin(mut c: libc::c_uchar) -> libc::c_uint {
  let mut v: libc::c_uint = 0;
  v = (c as libc::c_int - '0' as i32) as libc::c_uint;
  if v <= 9i32 as libc::c_uint {
    return v;
  }
  /* c | 0x20: letters to lower case, non-letters
   * to (potentially different) non-letters */
  v = ((c as libc::c_int | 0x20i32) as libc::c_uint).wrapping_sub('a' as i32 as libc::c_uint);
  if v <= 5i32 as libc::c_uint {
    return v.wrapping_add(10i32 as libc::c_uint);
  }
  return !0i32 as libc::c_uint;
  /* For testing:
  void t(char c) { printf("'%c'(%u) %u\n", c, c, hex_to_bin(c)); }
  int main() { t(0x10); t(0x20); t('0'); t('9'); t('A'); t('F'); t('a'); t('f');
  t('0'-1); t('9'+1); t('A'-1); t('F'+1); t('a'-1); t('f'+1); return 0; }
  */
}