diff --git a/lib/src/workspace.rs b/lib/src/workspace.rs index 56e98bdde..e06d72280 100644 --- a/lib/src/workspace.rs +++ b/lib/src/workspace.rs @@ -197,10 +197,8 @@ impl Workspace { workspace_root: &Path, git_repo_path: &Path, ) -> Result<(Self, Arc), WorkspaceInitError> { - let backend_initializer = { - let workspace_root = workspace_root.to_owned(); - let git_repo_path = git_repo_path.to_owned(); - move |settings: &UserSettings, store_path: &Path| -> Result, _> { + let backend_initializer = + |settings: &UserSettings, store_path: &Path| -> Result, _> { // If the git repo is inside the workspace, use a relative path to it so the // whole workspace can be moved without breaking. // TODO: Clean up path normalization. store_path is canonicalized by @@ -218,8 +216,7 @@ impl Workspace { let backend = GitBackend::init_external(settings, store_path, &store_relative_git_repo_path)?; Ok(Box::new(backend)) - } - }; + }; let signer = Signer::from_settings(user_settings)?; Self::init_with_backend(user_settings, workspace_root, &backend_initializer, signer) }