sched->scheduler

This commit is contained in:
Damien Elmes 2021-02-23 14:36:30 +10:00
parent e33f632169
commit 6a44269280
40 changed files with 22 additions and 22 deletions

View file

@ -30,7 +30,7 @@ use crate::{
notetype::{
all_stock_notetypes, CardTemplateSchema11, NoteType, NoteTypeSchema11, RenderCardOutput,
},
sched::{
scheduler::{
new::NewCardSortOrder,
parse_due_date_str,
states::{CardState, NextCardStates},
@ -71,7 +71,7 @@ use tokio::runtime::{self, Runtime};
mod dbproxy;
mod generic;
mod http_sync_server;
mod sched;
mod scheduler;
struct ThrottlingProgressHandler {
state: Arc<Mutex<ProgressState>>,
@ -2059,8 +2059,8 @@ fn pbcard_to_native(c: pb::Card) -> Result<Card> {
})
}
impl From<crate::sched::cutoff::SchedTimingToday> for pb::SchedTimingTodayOut {
fn from(t: crate::sched::cutoff::SchedTimingToday) -> pb::SchedTimingTodayOut {
impl From<crate::scheduler::cutoff::SchedTimingToday> for pb::SchedTimingTodayOut {
fn from(t: crate::scheduler::cutoff::SchedTimingToday) -> pb::SchedTimingTodayOut {
pb::SchedTimingTodayOut {
days_elapsed: t.days_elapsed,
next_day_at: t.next_day_at,

View file

@ -4,7 +4,7 @@
use crate::{
backend_proto as pb,
prelude::*,
sched::answering::{CardAnswer, Rating},
scheduler::answering::{CardAnswer, Rating},
};
impl From<pb::AnswerCardIn> for CardAnswer {

View file

@ -1,7 +1,7 @@
// 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, sched::states::FilteredState};
use crate::{backend_proto as pb, scheduler::states::FilteredState};
impl From<FilteredState> for pb::scheduling_state::Filtered {
fn from(state: FilteredState) -> Self {

View file

@ -1,7 +1,7 @@
// 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, sched::states::LearnState};
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 {

View file

@ -12,7 +12,7 @@ mod review;
use crate::{
backend_proto as pb,
sched::states::{CardState, NewState, NextCardStates, NormalState},
scheduler::states::{CardState, NewState, NextCardStates, NormalState},
};
impl From<NextCardStates> for pb::NextCardStates {

View file

@ -1,7 +1,7 @@
// 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, sched::states::NewState};
use crate::{backend_proto as pb, scheduler::states::NewState};
impl From<pb::scheduling_state::New> for NewState {
fn from(state: pb::scheduling_state::New) -> Self {

View file

@ -1,7 +1,7 @@
// 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, sched::states::NormalState};
use crate::{backend_proto as pb, scheduler::states::NormalState};
impl From<NormalState> for pb::scheduling_state::Normal {
fn from(state: NormalState) -> Self {

View file

@ -1,7 +1,7 @@
// 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, sched::states::PreviewState};
use crate::{backend_proto as pb, scheduler::states::PreviewState};
impl From<pb::scheduling_state::Preview> for PreviewState {
fn from(state: pb::scheduling_state::Preview) -> Self {

View file

@ -1,7 +1,7 @@
// 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, sched::states::RelearnState};
use crate::{backend_proto as pb, scheduler::states::RelearnState};
impl From<pb::scheduling_state::Relearning> for RelearnState {
fn from(state: pb::scheduling_state::Relearning) -> Self {

View file

@ -1,7 +1,7 @@
// 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, sched::states::ReschedulingFilterState};
use crate::{backend_proto as pb, scheduler::states::ReschedulingFilterState};
impl From<pb::scheduling_state::ReschedulingFilter> for ReschedulingFilterState {
fn from(state: pb::scheduling_state::ReschedulingFilter) -> Self {

View file

@ -1,7 +1,7 @@
// 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, sched::states::ReviewState};
use crate::{backend_proto as pb, scheduler::states::ReviewState};
impl From<pb::scheduling_state::Review> for ReviewState {
fn from(state: pb::scheduling_state::Review) -> Self {

View file

@ -5,7 +5,7 @@ use crate::{
collection::Collection,
define_newtype,
err::{AnkiError, Result},
sched::states::review::INITIAL_EASE_FACTOR,
scheduler::states::review::INITIAL_EASE_FACTOR,
timestamp::{TimestampMillis, TimestampSecs},
types::Usn,
};

View file

@ -26,7 +26,7 @@ pub mod notetype;
mod preferences;
pub mod prelude;
pub mod revlog;
pub mod sched;
pub mod scheduler;
pub mod search;
pub mod serde;
mod stats;

View file

@ -8,7 +8,7 @@ use crate::{
},
collection::Collection,
err::Result,
sched::cutoff::local_minutes_west_for_stamp,
scheduler::cutoff::local_minutes_west_for_stamp,
};
impl Collection {

View file

@ -167,7 +167,7 @@ impl Timespan {
mod test {
use crate::i18n::I18n;
use crate::log;
use crate::sched::timespan::{answer_button_time, time_span, MONTH};
use crate::scheduler::timespan::{answer_button_time, time_span, MONTH};
#[test]
fn answer_buttons() {

View file

@ -6,7 +6,7 @@ use crate::{
i18n::I18n,
prelude::*,
revlog::{RevlogEntry, RevlogReviewKind},
sched::timespan::time_span,
scheduler::timespan::time_span,
};
use askama::Template;
use chrono::prelude::*;

View file

@ -1,7 +1,7 @@
// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use crate::{i18n::I18n, prelude::*, sched::timespan::Timespan};
use crate::{i18n::I18n, prelude::*, scheduler::timespan::Timespan};
pub fn studied_today(cards: u32, secs: f32, i18n: &I18n) -> String {
let span = Timespan::from_secs(secs).natural_span();

View file

@ -7,7 +7,7 @@ use crate::{
decks::{Deck, DeckID, DeckKind},
err::Result,
notes::NoteID,
sched::congrats::CongratsInfo,
scheduler::congrats::CongratsInfo,
timestamp::{TimestampMillis, TimestampSecs},
types::Usn,
};

View file

@ -5,7 +5,7 @@ use crate::config::schema11_config_as_string;
use crate::err::Result;
use crate::err::{AnkiError, DBErrorKind};
use crate::timestamp::{TimestampMillis, TimestampSecs};
use crate::{i18n::I18n, sched::cutoff::v1_creation_date, text::without_combining};
use crate::{i18n::I18n, scheduler::cutoff::v1_creation_date, text::without_combining};
use regex::Regex;
use rusqlite::{functions::FunctionFlags, params, Connection, NO_PARAMS};
use std::cmp::Ordering;