Fix clippy lint for DoubleEndedIterator (#610)

This commit is contained in:
Stefan Holderbach 2023-07-20 22:06:13 +02:00 committed by GitHub
parent 4f31e200e4
commit 12c6b7d3c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1500,7 +1500,7 @@ impl Reedline {
)))
.unwrap_or_else(|_| Vec::new())
.get(0)
.and_then(|history| history.command_line.split_whitespace().rev().next())
.and_then(|history| history.command_line.split_whitespace().next_back())
.map(|token| (parsed.remainder.len(), indicator.len(), token.to_string())),
});