One big cleanup pass of clippy lints

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
ForLoveOfCats
2022-08-10 16:51:01 -07:00
committed by K Simmons
co-authored by Mikayla
parent e7540d2833
commit 8ba2f77148
138 changed files with 1328 additions and 1366 deletions
@@ -83,7 +83,9 @@ impl CommandPalette {
fn toggle(_: &mut Workspace, _: &Toggle, cx: &mut ViewContext<Workspace>) {
let workspace = cx.handle();
let window_id = cx.window_id();
let focused_view_id = cx.focused_view_id(window_id).unwrap_or(workspace.id());
let focused_view_id = cx
.focused_view_id(window_id)
.unwrap_or_else(|| workspace.id());
cx.as_mut().defer(move |cx| {
let this = cx.add_view(workspace.clone(), |cx| Self::new(focused_view_id, cx));