diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-08-08 00:09:02 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-08-08 00:09:56 +0200 |
commit | d1733aa5029c5b97390a236d94eed916ddb64577 (patch) | |
tree | 44771b2adae4786a620d5569bf8682f8c1b81559 /components/layout/table.rs | |
parent | 5410505c12233f9f34bbb8c4c3d5d0ea58bc0c2c (diff) | |
download | servo-d1733aa5029c5b97390a236d94eed916ddb64577.tar.gz servo-d1733aa5029c5b97390a236d94eed916ddb64577.zip |
Fix the build for NLL
Test with `RUSTFLAGS="-Zborrowck=mir -Ztwo-phase-borrows" cargo build`
https://internals.rust-lang.org/t/help-us-get-non-lexical-lifetimes-nll-over-the-finish-line/7807/7
Diffstat (limited to 'components/layout/table.rs')
-rw-r--r-- | components/layout/table.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/layout/table.rs b/components/layout/table.rs index 658a39d8e21..e36fd4b4e5a 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -448,9 +448,9 @@ impl Flow for TableFlow { .sum::<f32>(); for &index in &constrained_column_inline_sizes_indices { + let inline_size = self.column_computed_inline_sizes[index].size.0; self.column_computed_inline_sizes[index].size += - remaining_inline_size.scale_by( - self.column_computed_inline_sizes[index].size.0 as f32 / total_minimum_size); + remaining_inline_size.scale_by(inline_size as f32 / total_minimum_size); } } } @@ -531,7 +531,7 @@ impl Flow for TableFlow { self.block_flow.build_display_list_for_block(state, border_painting_mode); let iter = TableCellStyleIterator::new(&self); - for mut style in iter { + for style in iter { style.build_display_list(state) } } @@ -964,7 +964,7 @@ impl<'a> Iterator for TableRowAndGroupIterator<'a> { match self.kids.next() { Some(kid) => { if kid.is_table_rowgroup() { - let mut rowgroup = kid.as_table_rowgroup(); + let rowgroup = kid.as_table_rowgroup(); let iter = rowgroup.block_flow.base.child_iter(); self.group = Some((&rowgroup.block_flow.fragment, iter)); self.next() @@ -1010,7 +1010,7 @@ impl<'a> Iterator for MutTableRowAndGroupIterator<'a> { match self.kids.next() { Some(kid) => { if kid.is_table_rowgroup() { - let mut rowgroup = kid.as_mut_table_rowgroup(); + let rowgroup = kid.as_mut_table_rowgroup(); let iter = rowgroup.block_flow.base.child_iter_mut(); self.group = Some((&rowgroup.block_flow.fragment, iter)); self.next() |