diff --git a/epiphany-core/src/bin/epiphany-mvp-status.rs b/epiphany-core/src/bin/epiphany-mvp-status.rs index 8f5e45e9..5ebdf398 100644 --- a/epiphany-core/src/bin/epiphany-mvp-status.rs +++ b/epiphany-core/src/bin/epiphany-mvp-status.rs @@ -338,10 +338,10 @@ fn run_native_status(args: &Args, include_auxiliary_status: bool) -> Result { pub watched_root: Option, } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct EpiphanyReorientCheckpoint<'a> { - pub checkpoint_id: &'a str, - pub disposition: EpiphanyInvestigationDisposition, - pub next_action: Option<&'a str>, - pub code_refs: &'a [epiphany_state_model::EpiphanyCodeRef], -} - -impl<'a> From<&'a EpiphanyInvestigationCheckpoint> for EpiphanyReorientCheckpoint<'a> { - fn from(checkpoint: &'a EpiphanyInvestigationCheckpoint) -> Self { - Self { - checkpoint_id: &checkpoint.checkpoint_id, - disposition: checkpoint.disposition, - next_action: checkpoint.next_action.as_deref(), - code_refs: &checkpoint.code_refs, - } - } -} - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct EpiphanyReorientDecision { @@ -410,7 +391,7 @@ fn epiphany_path_key(path: &Path) -> String { #[cfg(test)] mod tests { use super::*; - use epiphany_state_model::EpiphanyCodeRef; + use epiphany_state_model::{EpiphanyCodeRef, EpiphanyInvestigationCheckpoint}; fn checkpoint() -> EpiphanyInvestigationCheckpoint { EpiphanyInvestigationCheckpoint { diff --git a/epiphany-state-model/src/lib.rs b/epiphany-state-model/src/lib.rs index 60cb2480..3a9283ed 100644 --- a/epiphany-state-model/src/lib.rs +++ b/epiphany-state-model/src/lib.rs @@ -873,6 +873,25 @@ pub enum RepoModelPatchPurpose { }, } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct EpiphanyReorientCheckpoint<'a> { + pub checkpoint_id: &'a str, + pub disposition: EpiphanyInvestigationDisposition, + pub next_action: Option<&'a str>, + pub code_refs: &'a [EpiphanyCodeRef], +} + +impl<'a> From<&'a EpiphanyInvestigationCheckpoint> for EpiphanyReorientCheckpoint<'a> { + fn from(checkpoint: &'a EpiphanyInvestigationCheckpoint) -> Self { + Self { + checkpoint_id: &checkpoint.checkpoint_id, + disposition: checkpoint.disposition, + next_action: checkpoint.next_action.as_deref(), + code_refs: &checkpoint.code_refs, + } + } +} + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema, TS)] #[serde(tag = "operation", rename_all = "snake_case")] #[ts(tag = "operation", rename_all = "snake_case")]