pub fn longest_common_prefix<C: Candidate>(candidates: &[C]) -> Option<&str>