Function find

Source
pub fn find(places: &[Place], name: &str) -> (Vec<Place>, TitleMatch)
Expand description

Every country a typed value reaches, and how it reached them.

Four steps, each derived from the source or from the name — the reasoning is on the module. The first three are reported as TitleMatch::Exact because each names exactly one country: a code and a set of initials are identifiers, not guesses, and telling a reader their uk “partly matched” would be false modesty about a certainty.

Only the substring step widens, and it says so: united reaches both the United Kingdom and the United States, and the caller is told so the answer can name them rather than pretend one was asked for.