mirror of
https://github.com/ankitects/anki.git
synced 2026-01-20 01:39:00 -05:00
22 lines
719 B
Rust
22 lines
719 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
use crate::{backend_proto as pb, scheduler::states::LearnState};
|
|
|
|
impl From<pb::scheduling_state::Learning> for LearnState {
|
|
fn from(state: pb::scheduling_state::Learning) -> Self {
|
|
LearnState {
|
|
remaining_steps: state.remaining_steps,
|
|
scheduled_secs: state.scheduled_secs,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl From<LearnState> for pb::scheduling_state::Learning {
|
|
fn from(state: LearnState) -> Self {
|
|
pb::scheduling_state::Learning {
|
|
remaining_steps: state.remaining_steps,
|
|
scheduled_secs: state.scheduled_secs,
|
|
}
|
|
}
|
|
}
|