Auto merge of #78066 - bugadani:wat, r=jonas-schievink

Clean up small, surprising bits of code

This PR clean up a small number of unrelated, small things I found while browsing the code base.
This commit is contained in:
bors 2020-10-18 13:50:31 +00:00
commit 834821e3b6
6 changed files with 49 additions and 54 deletions

View file

@ -103,7 +103,7 @@ impl<'tcx> Place<'tcx> {
/// Returns the type of this `Place` after all projections have been applied.
pub fn ty(&self) -> Ty<'tcx> {
self.projections.last().map_or_else(|| self.base_ty, |proj| proj.ty)
self.projections.last().map_or(self.base_ty, |proj| proj.ty)
}
/// Returns the type of this `Place` immediately before `projection_index`th projection