Code cleanup
This commit is contained in:
1 parent
1ad991667b
commit
f66bf69ef5
32 files changed
+234
-899
No files matched your search
+5
-3
@@ -33,7 +33,9 @@ impl DeckData {
|
||||
.map(|card_state| EntityHandle::from_id(card_state.word_id))
|
||||
.collect();
|
||||
let states = query.handles().collect::<Vec<EntityHandle<CardState>>>();
|
||||
let fsrs = Fsrs(FsrsModule::new(Self::set_links(states.as_slice(), &states_repo).as_slice()));
|
||||
let fsrs = Fsrs(FsrsModule::new(
|
||||
Self::set_links(states.as_slice(), &states_repo).as_slice(),
|
||||
));
|
||||
drop(states_repo);
|
||||
Self {
|
||||
states,
|
||||
@@ -61,7 +63,7 @@ impl DeckData {
|
||||
};
|
||||
|
||||
self.current_word_index = Some(index);
|
||||
(self.words[index].clone(), self.states[index].clone())
|
||||
(self.words[index], self.states[index])
|
||||
}
|
||||
|
||||
fn set_links<'a>(
|
||||
@@ -108,7 +110,7 @@ impl DeckData {
|
||||
timestamp: Utc::now(),
|
||||
deck_id: self.settings.id,
|
||||
word_id,
|
||||
answer: status.clone(),
|
||||
answer: status,
|
||||
before: old_score,
|
||||
after: new_score,
|
||||
fsrs,
|
||||
|
||||
Reference in new issue
Block a user