1
Fork 0

Replace some thens with some then_somes

This commit is contained in:
Maybe Waffle 2023-02-15 17:39:43 +00:00
parent 8751fa1a9a
commit 5bf6a46032
24 changed files with 27 additions and 26 deletions

View file

@ -320,7 +320,7 @@ impl DefId {
#[inline]
pub fn as_crate_root(self) -> Option<CrateNum> {
self.is_crate_root().then(|| self.krate)
self.is_crate_root().then_some(self.krate)
}
#[inline]