summaryrefslogtreecommitdiffstats
path: root/src/repl/mod.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-10-26 19:19:22 +0800
committersigoden <sigoden@gmail.com>2023-10-26 19:19:22 +0800
commit66fd547c0fac30d98565a92d93824237a4813669 (patch)
tree332ca0d0927739de69ff4e7b8ac589f4f001f9f1 /src/repl/mod.rs
parent7d8564cafb45afc4bccb666a310615b164800a9a (diff)
downloadaichat-66fd547c0fac30d98565a92d93824237a4813669.tar.gz
refactor: improve code quanity
remove tokio::runtime::Runtime from client
Diffstat (limited to 'src/repl/mod.rs')
-rw-r--r--src/repl/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs
index ce640f8..311ca72 100644
--- a/src/repl/mod.rs
+++ b/src/repl/mod.rs
@@ -9,7 +9,6 @@ pub use self::abort::*;
pub use self::handler::*;
pub use self::init::Repl;
-use crate::client::Client;
use crate::config::SharedConfig;
use crate::print_now;
use crate::term;
@@ -35,9 +34,9 @@ pub const REPL_COMMANDS: [(&str, &str); 13] = [
];
impl Repl {
- pub fn run(&mut self, client: Box<dyn Client>, config: SharedConfig) -> Result<()> {
+ pub fn run(&mut self, config: SharedConfig) -> Result<()> {
let abort = AbortSignal::new();
- let handler = ReplCmdHandler::init(client, config, abort.clone())?;
+ let handler = ReplCmdHandler::init(config, abort.clone())?;
print_now!("Welcome to aichat {}\n", env!("CARGO_PKG_VERSION"));
print_now!("Type \".help\" for more information.\n");
let mut already_ctrlc = false;