Streamline modify_size_estimate
.
This commit is contained in:
parent
86754cd8f2
commit
ed216e2f22
@ -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…
x
Reference in New Issue
Block a user