diff --git a/src/parse/features/suggestions.rs b/src/parse/features/suggestions.rs index a7b38ce2..73fb0420 100644 --- a/src/parse/features/suggestions.rs +++ b/src/parse/features/suggestions.rs @@ -25,10 +25,8 @@ where candidate = Some((confidence, pv.as_ref().to_owned())); } } - match candidate { - None => None, - Some((_, candidate)) => Some(candidate.to_owned()), - } + + candidate.map(|(_, candidate)| candidate) } #[cfg(not(feature = "suggestions"))]