rustls 0.1.0

Rustls is a modern TLS library written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
/// Return the first member of `prefs` that appears in `avail`.
pub fn first_in_both<T: Clone + PartialEq>(prefs: &[T], avail: &[T]) -> Option<T> {
  for p in prefs {
    if avail.contains(p) {
      return Some(p.clone());
    }
  }

  None
}