mirror of
https://github.com/ankitects/anki.git
synced 2025-11-25 14:07:14 -05:00
* Prepare to switch Rust import style * Run nightly format Closes #2320 * Clean up a few imports * Enable comment wrapping * Wrap comments
23 lines
717 B
Rust
23 lines
717 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
use super::interval_kind::IntervalKind;
|
|
use crate::revlog::RevlogReviewKind;
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
|
|
pub struct NewState {
|
|
pub position: u32,
|
|
}
|
|
|
|
impl NewState {
|
|
pub(crate) fn interval_kind(self) -> IntervalKind {
|
|
// todo: consider packing the due number in here; it would allow us to restore
|
|
// the original position of cards - though not as cheaply as if it were
|
|
// a card property.
|
|
IntervalKind::InSecs(0)
|
|
}
|
|
|
|
pub(crate) fn revlog_kind(self) -> RevlogReviewKind {
|
|
RevlogReviewKind::Learning
|
|
}
|
|
}
|