One big cleanup pass of clippy lints

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
ForLoveOfCats 2022-08-10 17:39:24 -04:00 committed by K Simmons
parent e7540d2833
commit 8ba2f77148
138 changed files with 1328 additions and 1366 deletions

View file

@ -126,10 +126,10 @@ fn motion(motion: Motion, cx: &mut MutableAppContext) {
impl Motion {
pub fn linewise(self) -> bool {
use Motion::*;
match self {
Down | Up | StartOfDocument | EndOfDocument | CurrentLine => true,
_ => false,
}
matches!(
self,
Down | Up | StartOfDocument | EndOfDocument | CurrentLine
)
}
pub fn inclusive(self) -> bool {
@ -282,8 +282,7 @@ fn next_word_end(
// we have backtraced already
if !map
.chars_at(point)
.skip(1)
.next()
.nth(1)
.map(|c| c == '\n')
.unwrap_or(true)
{