Add more themes and rustfmt

This commit is contained in:
2026-02-16 22:12:29 +00:00
parent 6d6815af02
commit edd2f7e6b5
36 changed files with 854 additions and 329 deletions

View File

@@ -1,3 +1,3 @@
pub mod input;
pub mod drill;
pub mod input;
pub mod result;

View File

@@ -1,8 +1,8 @@
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use crate::session::input::KeystrokeEvent;
use crate::session::drill::DrillState;
use crate::session::input::KeystrokeEvent;
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct DrillResult {
@@ -37,7 +37,12 @@ pub struct KeyTime {
}
impl DrillResult {
pub fn from_drill(drill: &DrillState, events: &[KeystrokeEvent], drill_mode: &str, ranked: bool) -> Self {
pub fn from_drill(
drill: &DrillState,
events: &[KeystrokeEvent],
drill_mode: &str,
ranked: bool,
) -> Self {
let per_key_times: Vec<KeyTime> = events
.windows(2)
.map(|pair| {