Skip to content

Commit

Permalink
remove worksheet_range_at
Browse files Browse the repository at this point in the history
  • Loading branch information
dimastbk committed Jan 20, 2024
1 parent 11cef31 commit dbc853f
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/types/workbook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ impl SheetsEnum {
SheetsEnum::FileLike(f) => f.worksheet_range(name),
}
}

fn worksheet_range_at(
&mut self,
index: usize,
) -> Option<Result<calamine::Range<calamine::Data>, Error>> {
match self {
SheetsEnum::File(f) => f.worksheet_range_at(index),
SheetsEnum::FileLike(f) => f.worksheet_range_at(index),
}
}
}

#[pyclass]
Expand Down Expand Up @@ -166,12 +156,6 @@ impl CalamineWorkbook {
.get(index)
.ok_or_else(|| WorksheetNotFound::new_err(format!("Worksheet '{}' not found", index)))?
.to_string();
let range = self
.sheets
.worksheet_range_at(index)
.unwrap_or_else(|| Err(Error::Msg("Workbook is empty")))
.map_err(err_to_py)?;

Ok(CalamineSheet::new(name, range))
self.get_sheet_by_name(&name)
}
}

0 comments on commit dbc853f

Please sign in to comment.