Skip to content

Commit

Permalink
chore: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
PrettyWood committed Jul 1, 2024
1 parent 67c1f7c commit 1bd8b42
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/xlsx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,7 @@ impl<RS: Read + Seek> Xlsx<RS> {
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(),
Expand Down Expand Up @@ -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<Vec<u8>, XlsxError> {
let cell = get_row_column(
name.iter()
.map(|c| *c as u8)
.collect::<Vec<_>>()
.as_slice(),
)?;
let cell = get_row_column(name.iter().map(|c| *c as u8).collect::<Vec<_>>().as_slice())?;
coordinate_to_name((
(cell.0 as i64 + offset.0) as u32,
(cell.1 as i64 + offset.1) as u32,
Expand Down

0 comments on commit 1bd8b42

Please sign in to comment.