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

@ -99,7 +99,7 @@ impl TerminalView {
Ok(terminal) => {
let terminal = cx.add_model(|cx| terminal.subscribe(cx));
let view = cx.add_view(|cx| ConnectedView::from_terminal(terminal, modal, cx));
cx.subscribe(&view, |_this, _content, event, cx| cx.emit(event.clone()))
cx.subscribe(&view, |_this, _content, event, cx| cx.emit(*event))
.detach();
TerminalContent::Connected(view)
}
@ -206,7 +206,7 @@ impl View for ErrorView {
)
.with_child(Text::new(program_text, style.clone()).contained().boxed())
.with_child(Text::new(directory_text, style.clone()).contained().boxed())
.with_child(Text::new(error_text, style.clone()).contained().boxed())
.with_child(Text::new(error_text, style).contained().boxed())
.aligned()
.boxed()
}
@ -333,7 +333,7 @@ pub fn get_working_directory(
.filter(|dir| dir.is_dir())
}
};
res.or_else(|| home_dir())
res.or_else(home_dir)
}
///Get's the first project's home directory, or the home directory