nightly clippy fixes

Includes a false-positive, https://github.com/rust-lang/rust-clippy/issues/13018.
This commit is contained in:
Ilya Grigoriev 2024-06-28 22:47:54 -07:00
parent c563ea8b29
commit 6d3d7c61f2
2 changed files with 2 additions and 2 deletions

View file

@ -1029,6 +1029,7 @@ impl RefNamesIndex {
#[allow(unknown_lints)] // XXX FIXME (aseipp): nightly bogons; re-test this occasionally
#[allow(clippy::manual_unwrap_or_default)]
#[allow(clippy::manual_unwrap_or)] // https://github.com/rust-lang/rust-clippy/issues/13018
pub fn get(&self, id: &CommitId) -> &[Rc<RefName>] {
if let Some(names) = self.index.get(id) {
names

View file

@ -283,9 +283,8 @@ impl Workspace {
let workspace = Workspace::new(workspace_root, working_copy, repo_loader)?;
Ok((workspace, repo))
})()
.map_err(|err| {
.inspect_err(|_err| {
let _ = std::fs::remove_dir_all(jj_dir);
err
})
}