diff --git a/cli/src/commit_templater.rs b/cli/src/commit_templater.rs index 58d0523514..daf7b2fd87 100644 --- a/cli/src/commit_templater.rs +++ b/cli/src/commit_templater.rs @@ -1027,15 +1027,8 @@ 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] { - if let Some(names) = self.index.get(id) { - names - } else { - &[] - } + self.index.get(id).map_or(&[], |names: &Vec<_>| names) } }