jmcnamara / rust_xlsxwriter

A Rust library for creating Excel XLSX files.
https://crates.io/crates/rust_xlsxwriter
Apache License 2.0
316 stars 25 forks source link

Fix "duplication" of methods Workbook::save_to_path and Workbook::save #15

Closed Fight-For-Food closed 1 year ago

Fight-For-Food commented 1 year ago

Main point is to use generics instead of enum and second function. We can't convert Path to &str safely, but we can convert &str to Path via impl AsRef for str

jmcnamara commented 1 year ago

Thanks. That is a nice refactor. Merged.