From 5b1a090c5e520efe5b74265688391562c8354f14 Mon Sep 17 00:00:00 2001 From: Kenneth Loeffler Date: Fri, 30 Jun 2023 11:05:30 -0700 Subject: [PATCH] Fix serve session clippy lints (#684) The fifth in a series of PRs that aim to get CI passing --- src/serve_session.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/serve_session.rs b/src/serve_session.rs index 96a68ac9..9dab5446 100644 --- a/src/serve_session.rs +++ b/src/serve_session.rs @@ -102,12 +102,11 @@ impl ServeSession { log::trace!("Starting new ServeSession at path {}", start_path.display()); - let project_path; - if Project::is_project_file(start_path) { - project_path = Cow::Borrowed(start_path); + let project_path = if Project::is_project_file(start_path) { + Cow::Borrowed(start_path) } else { - project_path = Cow::Owned(start_path.join("default.project.json")); - } + Cow::Owned(start_path.join("default.project.json")) + }; log::debug!("Loading project file from {}", project_path.display()); @@ -127,7 +126,7 @@ impl ServeSession { let instance_context = InstanceContext::default(); log::trace!("Generating snapshot of instances from VFS"); - let snapshot = snapshot_from_vfs(&instance_context, &vfs, &start_path)?; + let snapshot = snapshot_from_vfs(&instance_context, &vfs, start_path)?; log::trace!("Computing initial patch set"); let patch_set = compute_patch_set(snapshot, &tree, root_id);