From c5a2f4603c3c3eb7995f4e77453ab8ca50ff88b8 Mon Sep 17 00:00:00 2001 From: sigoden Date: Mon, 6 Mar 2023 07:08:51 +0800 Subject: chore: optimize code --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index ec127f5..c7ae56e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,7 +19,7 @@ use is_terminal::IsTerminal; use anyhow::{anyhow, Result}; use clap::Parser; use render::MarkdownRender; -use repl::{Repl, ReplCmdHandler}; +use repl::Repl; fn main() -> Result<()> { let cli = Cli::parse(); @@ -73,6 +73,5 @@ fn start_directive(client: ChatGptClient, config: SharedConfig, input: &str) -> fn start_interactive(client: ChatGptClient, config: SharedConfig) -> Result<()> { let mut repl = Repl::init(config.clone())?; - let handler = ReplCmdHandler::init(client, config)?; - repl.run(handler) + repl.run(client, config) } -- cgit v1.2.3