Rather than returning the confusing tuple (Cow<'static, str>, Cow<'static, str>) from Autocomplete::autocomplete(), create a new AutocompleteSuggestion struct to better abstract the implementation. The result is occasionally more verbose but hopefully much clearer to read. It has the side benefit of removing a ton of silly .into()s.
Rather than returning the confusing tuple
(Cow<'static, str>, Cow<'static, str>)
fromAutocomplete::autocomplete()
, create a newAutocompleteSuggestion
struct to better abstract the implementation. The result is occasionally more verbose but hopefully much clearer to read. It has the side benefit of removing a ton of silly.into()
s.Resolves #326.