Skip to content

Commit

Permalink
Merge pull request #445 from mmorley0395/ok_or_docs
Browse files Browse the repository at this point in the history
docs: fixes #436
  • Loading branch information
tafia authored Jul 2, 2024
2 parents ed305da + 7836fa5 commit ec762b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ use calamine::{open_workbook, Error, Xlsx, Reader, RangeDeserializerBuilder};
fn example() -> Result<(), Error> {
let path = format!("{}/tests/temperature.xlsx", env!("CARGO_MANIFEST_DIR"));
let mut workbook: Xlsx<_> = open_workbook(path)?;
let range = workbook.worksheet_range("Sheet1")
.ok_or(Error::Msg("Cannot find 'Sheet1'"))??;
let range = workbook.worksheet_range("Sheet1")?;


let mut iter = RangeDeserializerBuilder::new().from_range(&range)?;

Expand Down

0 comments on commit ec762b3

Please sign in to comment.