From e48050bbcbf9fd5e2a0d97da8f05436589f7ae31 Mon Sep 17 00:00:00 2001 From: "Shahar \"Dawn\" Or" Date: Sun, 12 May 2024 22:06:45 +0700 Subject: [PATCH] style: rename a variant --- src/app/state.rs | 4 ++-- src/app/state/repl_state.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/state.rs b/src/app/state.rs index 65dbeab..06c7c0f 100644 --- a/src/app/state.rs +++ b/src/app/state.rs @@ -132,7 +132,7 @@ impl State { let output = match &mut session_live.expecting { ReplSessionExpecting::Nothing => anyhow::bail!("not expecting, got {:?}", ch as char), - ReplSessionExpecting::InitialPrompt(acc) => { + ReplSessionExpecting::Prompt(acc) => { acc.push(ch.into()); let string = String::from_utf8(strip_ansi_escapes::strip(acc)?)?; @@ -158,7 +158,7 @@ impl State { expected_result: expected_result.clone(), } } else { - ReplSessionExpecting::InitialPrompt(String::new()) + ReplSessionExpecting::Prompt(String::new()) }; vec![] } else { diff --git a/src/app/state/repl_state.rs b/src/app/state/repl_state.rs index 647f569..e416188 100644 --- a/src/app/state/repl_state.rs +++ b/src/app/state/repl_state.rs @@ -45,7 +45,7 @@ pub(crate) struct ReplSessionLive { #[derive(Debug)] pub(crate) enum ReplSessionExpecting { Nothing, - InitialPrompt(String), + Prompt(String), Echo { acc: String, last_query: ReplQuery, @@ -61,7 +61,7 @@ impl ReplSessionLive { pub(crate) fn new(entries: ReplExampleEntries) -> Self { Self { iterator: entries.into_iter(), - expecting: ReplSessionExpecting::InitialPrompt(String::new()), + expecting: ReplSessionExpecting::Prompt(String::new()), } } }