Streamline modify_size_estimate
.
This commit is contained in:
parent
86754cd8f2
commit
ed216e2f22
1 changed files with 1 additions and 4 deletions
|
@ -334,10 +334,7 @@ impl<'tcx> CodegenUnit<'tcx> {
|
|||
}
|
||||
|
||||
pub fn modify_size_estimate(&mut self, delta: usize) {
|
||||
assert!(self.size_estimate.is_some());
|
||||
if let Some(size_estimate) = self.size_estimate {
|
||||
self.size_estimate = Some(size_estimate + delta);
|
||||
}
|
||||
*self.size_estimate.as_mut().unwrap() += delta;
|
||||
}
|
||||
|
||||
pub fn contains_item(&self, item: &MonoItem<'tcx>) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue