mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00

Due to the orphan rule, this meant removing our usages of impl ProtoStruct, or converting them to a trait when they were used commonly. rslib now directly references anki_proto and anki_i18n, instead of 'pub use'-ing them, and we can put the generated files back in OUT_DIR.
22 lines
750 B
Rust
22 lines
750 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
use crate::scheduler::states::PreviewState;
|
|
|
|
impl From<anki_proto::scheduler::scheduling_state::Preview> for PreviewState {
|
|
fn from(state: anki_proto::scheduler::scheduling_state::Preview) -> Self {
|
|
PreviewState {
|
|
scheduled_secs: state.scheduled_secs,
|
|
finished: state.finished,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl From<PreviewState> for anki_proto::scheduler::scheduling_state::Preview {
|
|
fn from(state: PreviewState) -> Self {
|
|
anki_proto::scheduler::scheduling_state::Preview {
|
|
scheduled_secs: state.scheduled_secs,
|
|
finished: state.finished,
|
|
}
|
|
}
|
|
}
|