removes unnecessary tidy ignore

This commit is contained in:
root 2020-06-26 19:40:09 +00:00
parent 15e81beb47
commit cf398a33eb

View File

@ -2,8 +2,6 @@
//!
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/mir/index.html
// ignore-tidy-filelength
use crate::mir::interpret::{GlobalAlloc, Scalar};
use crate::mir::visit::MirVisitable;
use crate::ty::adjustment::PointerCast;
@ -299,11 +297,7 @@ impl<'tcx> Body<'tcx> {
pub fn temps_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a {
(self.arg_count + 1..self.local_decls.len()).filter_map(move |index| {
let local = Local::new(index);
if self.local_decls[local].is_user_variable() {
None
} else {
Some(local)
}
if self.local_decls[local].is_user_variable() { None } else { Some(local) }
})
}
@ -1190,11 +1184,7 @@ impl<'tcx> BasicBlockData<'tcx> {
}
pub fn visitable(&self, index: usize) -> &dyn MirVisitable<'tcx> {
if index < self.statements.len() {
&self.statements[index]
} else {
&self.terminator
}
if index < self.statements.len() { &self.statements[index] } else { &self.terminator }
}
}