diff options
| author | sigoden <sigoden@gmail.com> | 2024-03-06 01:46:47 +0000 |
|---|---|---|
| committer | sigoden <sigoden@gmail.com> | 2024-03-06 01:46:47 +0000 |
| commit | 46cb320aa594c41203f0daa67d3e11594e7a3917 (patch) | |
| tree | 99c9d736fa3eec73bda21d042c556166597fea2b /src | |
| parent | b82ae88a15debd83d646c43755a50678ca4d3891 (diff) | |
| download | aichat-46cb320aa594c41203f0daa67d3e11594e7a3917.tar.gz | |
chore: spell check
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/mod.rs | 6 | ||||
| -rw-r--r-- | src/main.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 909e751..ffdb942 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -682,9 +682,9 @@ impl Config { } pub fn should_compress_session(&mut self) -> bool { - if let Some(sesion) = self.session.as_mut() { - if sesion.need_compress(self.compress_threshold) { - sesion.compressing = true; + if let Some(session) = self.session.as_mut() { + if session.need_compress(self.compress_threshold) { + session.compressing = true; return true; } } diff --git a/src/main.rs b/src/main.rs index f6cafa3..c967611 100644 --- a/src/main.rs +++ b/src/main.rs @@ -167,7 +167,7 @@ fn execute(config: &GlobalConfig, text: &str) -> Result<()> { println!("{}", markdown_render.render(&eval_str).trim()); let mut describe = false; loop { - let anwser = Text::new("[e]xecute, [d]escribe, [a]bort: ") + let answer = Text::new("[e]xecute, [d]escribe, [a]bort: ") .with_default("e") .with_validator(|input: &str| { match matches!(input, "E" | "e" | "D" | "d" | "A" | "a") { @@ -181,7 +181,7 @@ fn execute(config: &GlobalConfig, text: &str) -> Result<()> { println!(); - match anwser.as_str() { + match answer.as_str() { "E" | "e" => { let code = run_command(&eval_str)?; if code != 0 { |
