mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-14 14:32:31 +00:00
M2.1: Fix Rust 1.100 Clippy lint in LaTeX table test (#6433)
The gate's Clippy flags needless_range_loop in the borderless/bordered table fixtures. Iterate the rows and cells mutably instead; no behaviour change.
This commit is contained in:
1 parent
b71f257f1b
commit
a45e37b90d
1 file changed
+6
-6
@@ -391,9 +391,9 @@ fn table_borders_and_borderless_round_trip() {
|
||||
let mut doc = Document::new();
|
||||
let mut t_borderless = Table::new(2, 2, 400.0);
|
||||
t_borderless.props.style = None;
|
||||
for r in 0..2 {
|
||||
for c in 0..2 {
|
||||
t_borderless.rows[r].cells[c].blocks = vec![para_block(Paragraph::with_text("cell", CharProps::default()))];
|
||||
for row in &mut t_borderless.rows {
|
||||
for cell in &mut row.cells {
|
||||
cell.blocks = vec![para_block(Paragraph::with_text("cell", CharProps::default()))];
|
||||
}
|
||||
}
|
||||
doc.body = vec![Arc::new(Block::Table(t_borderless))];
|
||||
@@ -407,9 +407,9 @@ fn table_borders_and_borderless_round_trip() {
|
||||
let mut doc_bordered = Document::new();
|
||||
let mut t_bordered = Table::new(2, 2, 400.0);
|
||||
t_bordered.props.style = Some("TableGrid".to_string());
|
||||
for r in 0..2 {
|
||||
for c in 0..2 {
|
||||
t_bordered.rows[r].cells[c].blocks = vec![para_block(Paragraph::with_text("cell", CharProps::default()))];
|
||||
for row in &mut t_bordered.rows {
|
||||
for cell in &mut row.cells {
|
||||
cell.blocks = vec![para_block(Paragraph::with_text("cell", CharProps::default()))];
|
||||
}
|
||||
}
|
||||
doc_bordered.body = vec![Arc::new(Block::Table(t_bordered))];
|
||||
|
||||
Reference in new issue
Block a user