MathNya / umya-spreadsheet

A pure rust library for reading and writing spreadsheet files
MIT License
240 stars 41 forks source link

structs::numbering_format::NumberingFormat issue #81

Closed CataMark closed 1 year ago

CataMark commented 1 year ago

The following panics by default:

pub fn set_number_format_id(&mut self, value: u32) -> &mut Self {
  self.format_code = FILL_BUILT_IN_FORMAT_CODES
      .iter()
      .find_map(|(key, val)| {
          if key == &value {
              Some(val.clone())
          } else {
              panic!("Not Found NumberFormatId.") //this line should be None
          }
      })
      .unwrap();
  self.number_format_id = value;
  self.is_build_in = true;
  self
}
MathNya commented 1 year ago

Thank you for your report. We will soon release a version that fixes the issues you have pointed out.

MathNya commented 1 year ago

Version 0.8.4, which fixes the problem, has been released.