Skip to content

Commit

Permalink
more atoi_simd
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Jan 1, 2025
1 parent 93ada77 commit c0c6c69
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/xlsx/cells_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,18 +327,15 @@ fn read_v<'s>(
) -> Result<DataRef<'s>, XlsxError> {
let cell_format = match get_attribute(c_element.attributes(), QName(b"s")) {
Ok(Some(style)) => {
let id: usize = std::str::from_utf8(style)
.unwrap_or("0")
.parse()
.unwrap_or(0);
let id = atoi_simd::parse::<usize>(style).unwrap_or(0);
formats.get(id)
}
_ => Some(&CellFormat::Other),
};
match get_attribute(c_element.attributes(), QName(b"t"))? {
Some(b"s") => {
// shared string
let idx: usize = v.parse()?;
let idx = atoi_simd::parse::<usize>(v.as_bytes()).unwrap_or(0);
Ok(DataRef::SharedString(&strings[idx]))
}
Some(b"b") => {
Expand Down

0 comments on commit c0c6c69

Please sign in to comment.