Fix some clippy warnings

This commit is contained in:
Tobias Hunger 2022-08-08 17:25:31 +02:00 committed by Tobias Hunger
parent 7eab597b48
commit 521a4001dc
3 changed files with 4 additions and 3 deletions

View file

@ -320,7 +320,7 @@ fn maybe_goto_preview(
let begin = text[..offset].rfind(|x: char| !x.is_ascii_alphanumeric())? + 1;
let text = &text.as_bytes()[begin..];
let rest = text.strip_prefix(b"preview").or_else(|| text.strip_prefix(b"PREVIEW"))?;
if rest.get(0).map_or(true, |x| x.is_ascii_alphanumeric()) {
if rest.first().map_or(true, |x| x.is_ascii_alphanumeric()) {
return None;
}