remove clone from states
This commit is contained in:
1 parent
f66bf69ef5
commit
ace54b10e1
8 files changed
-11
No files matched your search
@@ -11,10 +11,8 @@ use iced::widget::*;
|
||||
use iced::{Element, Fill, FillPortion, Task};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct HistoryState {
|
||||
list: Vec<(WordData, HistoryNote)>,
|
||||
pub state: AppState,
|
||||
}
|
||||
|
||||
impl NavigatedPage<HistoryMessage> for HistoryState {
|
||||
@@ -50,7 +48,6 @@ impl HistoryState {
|
||||
let dict = &state.dictionary.read();
|
||||
let history_repo = &mut state.history.write();
|
||||
history_repo.init().expect("TODO: panic message");
|
||||
let id = id;
|
||||
let mut history = history_repo.query(Arc::new(move |h| h.deck_id == id));
|
||||
let words = history
|
||||
.iter(history_repo)
|
||||
@@ -69,7 +66,6 @@ impl HistoryState {
|
||||
.collect();
|
||||
Self {
|
||||
list: words,
|
||||
state: state.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user