From 1bd8b4205d976424fc9a134f1b6461db3a0fe9de Mon Sep 17 00:00:00 2001 From: Eric Jolibois Date: Mon, 1 Jul 2024 22:18:48 +0200 Subject: [PATCH] chore: cargo fmt --- src/xlsx/mod.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/xlsx/mod.rs b/src/xlsx/mod.rs index 98de90c..3a47082 100644 --- a/src/xlsx/mod.rs +++ b/src/xlsx/mod.rs @@ -657,8 +657,7 @@ impl Xlsx { buf.clear(); match xml.read_event_into(&mut buf) { Ok(Event::Start(ref e)) if e.local_name() == QName(b"mergeCell").into() => { - if let Some(attr) = get_attribute(e.attributes(), QName(b"ref"))? - { + if let Some(attr) = get_attribute(e.attributes(), QName(b"ref"))? { let dismension = get_dimension(attr)?; regions.push(( sheet_name.to_string(), @@ -1233,12 +1232,7 @@ fn valid_cell_name(name: &[char]) -> bool { /// advance the cell name by the offset fn replace_cell(name: &[char], offset: (i64, i64)) -> Result, XlsxError> { - let cell = get_row_column( - name.iter() - .map(|c| *c as u8) - .collect::>() - .as_slice(), - )?; + let cell = get_row_column(name.iter().map(|c| *c as u8).collect::>().as_slice())?; coordinate_to_name(( (cell.0 as i64 + offset.0) as u32, (cell.1 as i64 + offset.1) as u32,