pub fn closest<'a>(
name: &str,
candidates: impl IntoIterator<Item = &'a str>,
max: usize,
) -> Vec<&'a str>Expand description
Up to max of candidates closest to name, best first: a different case, then a small
spelling distance (at most a third of the name’s length, at least 2), then names that share
the last dotted segment (layer.delete → edit.delete) or contain the name, then names that
hold its letters in order. Empty when nothing is close.