pub fn is_valid(salt: String) -> bool {
  let mut salts = SALTS.lock().expect("Failed to lock Salt mutex: is_valid()");
  match salts.iter().position(|s| s.value == salt) {
    Some(index) => {
      if salts[index].one_time {
        salts.remove(index);
      }
      true
    }
    None => false,
  }
}
/// Checks if the given Salt representation is valid.
Checks if the given Salt representation is valid.
Checks if the given Salt representation is valid .
pub fn is_valid(salt: String) -> bool {
  let mut salts = SALTS.lock().expect("Failed to lock Salt mutex: is_valid()");
  match salts.iter().position(|s| s.value == salt) {
    Some(index) => {
      if salts[index].one_time {
        salts.remove(index);
      }
      true
    }
    None => false,
  }
}
pub fn is_valid ( salt : String ) -> bool { let mut salts = SALTS . lock ( ) . expect ( " " ) ; match salts . iter ( ) . position ( | s | s . value == salt ) { Some ( index ) => { if salts [ index ] . one_time { salts . remove ( index ) ; } true } None => false , } }
Checks if the given Salt representation is valid.
Checks if the given Salt representation is valid .
salt
String
salt
String