Skip to content

Commit

Permalink
Fix serve session clippy lints (#684)
Browse files Browse the repository at this point in the history
The fifth in a series of PRs that aim to get CI passing
  • Loading branch information
kennethloeffler committed Jun 30, 2023
1 parent e9efa23 commit 5b1a090
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/serve_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand All @@ -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);
Expand Down

0 comments on commit 5b1a090

Please sign in to comment.