tafia / calamine

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

Example Code from Readme Doesn't Work (no method named `ok_or`) #436

Closed richard-copperdata closed 2 days ago

richard-copperdata commented 1 month ago

The following code in the first example does not pass cargo check in calamine version 0.24.0:

let mut workbook: Xlsx<_> = open_workbook(path)?;
    let range = workbook
        .worksheet_range("Sheet1")
        .ok_or(Error::Msg("Cannot find 'Sheet1'"))??;

Results in error:

No method named `ok_or` found for enum `Result` in the current scope

Using rustc 1.77.2