Skip to content

Commit

Permalink
is_empty for FSRSDataset
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock committed Aug 24, 2023
1 parent 76d4ac9 commit d5766c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ impl FSRSDataset {
self.dataset.len()
}

pub fn is_empty(&self) -> bool {
self.dataset.is_empty()
}

fn new() -> Self {
let dataset = InMemDataset::<FSRSItem>::new(anki_to_fsrs());
Self { dataset }
Expand Down

0 comments on commit d5766c8

Please sign in to comment.