Formatting
This commit is contained in:
1 parent
3f43676580
commit
878ff3f1e4
6 files changed
+36
-16
No files matched your search
+12
-1
@@ -364,7 +364,17 @@ impl DeckData {
|
||||
let state_locked = state.lock();
|
||||
|
||||
let stats = load_stats_of_deck(settings, &state_locked.connection);
|
||||
let words = stats.iter().map(|stat| state_locked.dictionary.binary_search_by_key(&stat.word_id, |w| w.id).unwrap()).map(|index| &state_locked.dictionary[index]).cloned().collect();
|
||||
let words = stats
|
||||
.iter()
|
||||
.map(|stat| {
|
||||
state_locked
|
||||
.dictionary
|
||||
.binary_search_by_key(&stat.word_id, |w| w.id)
|
||||
.unwrap()
|
||||
})
|
||||
.map(|index| &state_locked.dictionary[index])
|
||||
.cloned()
|
||||
.collect();
|
||||
|
||||
Self {
|
||||
set: stats,
|
||||
@@ -381,6 +391,7 @@ impl DeckData {
|
||||
settings: settings.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn next(&mut self) -> (WordData, CardStatistics) {
|
||||
let index = match self.order_module.clone() {
|
||||
OrderModule::SemiRandomSRS(mut module) => {
|
||||
|
||||
Reference in new issue
Block a user