tafia / calamine

A pure Rust Excel/OpenDocument SpreadSheets file reader: rust on metal sheets
MIT License
1.6k stars 155 forks source link

feat: support bools in DataType.as_f64 and DataType.as_i64 variants #399

Closed lukapeschke closed 4 months ago

lukapeschke commented 5 months ago

Hello @tafia , I figured it would be nice to have an implicit conversion from bool to i64/f64 when using as_{i64,f64} , do you believe this makes sense as well ?

I haven't modified as_string yet because I thought it'd maybe be unexpected behaviour, but I'd gladly add if as well if you believe it makes sense :slightly_smiling_face:

tafia commented 4 months ago

Thanks, I think it is reasonable yes.