run: Run is Copy

This commit is contained in:
Quaternions 2024-08-20 16:11:34 -07:00
parent 27dba8a90d
commit 0a95f492ba

View File

@ -1,7 +1,7 @@
use crate::timer::{TimerFixed,Realtime,Paused,Unpaused}; use crate::timer::{TimerFixed,Realtime,Paused,Unpaused};
use crate::integer::Time; use crate::integer::Time;
#[derive(Clone,Debug)] #[derive(Clone,Copy,Debug)]
pub enum FlagReason{ pub enum FlagReason{
Anticheat, Anticheat,
StyleChange, StyleChange,
@ -42,14 +42,14 @@ impl std::fmt::Display for Error{
} }
impl std::error::Error for Error{} impl std::error::Error for Error{}
#[derive(Clone,Debug)] #[derive(Clone,Copy,Debug)]
enum RunState{ enum RunState{
Created, Created,
Started{timer:TimerFixed<Realtime,Unpaused>}, Started{timer:TimerFixed<Realtime,Unpaused>},
Finished{timer:TimerFixed<Realtime,Paused>}, Finished{timer:TimerFixed<Realtime,Paused>},
} }
#[derive(Clone,Debug)] #[derive(Clone,Copy,Debug)]
pub struct Run{ pub struct Run{
state:RunState, state:RunState,
flagged:Option<FlagReason>, flagged:Option<FlagReason>,