summaryrefslogtreecommitdiffstats
path: root/src/repl/init.rs
diff options
context:
space:
mode:
authorAnthony Rubick <68485672+AnthonyMichaelTDM@users.noreply.github.com>2023-07-09 20:07:09 -0700
committerGitHub <noreply@github.com>2023-07-10 11:07:09 +0800
commit97fc7de6754c8b5c383d7d5e3f9e26b3bbfb08fb (patch)
treec19390877425fa50049761e8ee6bc93f21c46f56 /src/repl/init.rs
parentec51b84290215d11d5045de8baa9b89f2447b1e9 (diff)
downloadaichat-97fc7de6754c8b5c383d7d5e3f9e26b3bbfb08fb.tar.gz
fix: minor code cleanup and pedantic lints (#134)
Diffstat (limited to 'src/repl/init.rs')
-rw-r--r--src/repl/init.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/repl/init.rs b/src/repl/init.rs
index 2ec30bf..089e855 100644
--- a/src/repl/init.rs
+++ b/src/repl/init.rs
@@ -24,7 +24,7 @@ impl Repl {
.map(|(v, _)| v.to_string())
.collect();
- let completer = Self::create_completer(config.clone(), &commands);
+ let completer = Self::create_completer(&config, &commands);
let highlighter = ReplHighlighter::new(config.clone(), commands);
let keybindings = Self::create_keybindings();
let history = Self::create_history()?;
@@ -45,7 +45,7 @@ impl Repl {
Ok(Self { editor, prompt })
}
- fn create_completer(config: SharedConfig, commands: &[String]) -> DefaultCompleter {
+ fn create_completer(config: &SharedConfig, commands: &[String]) -> DefaultCompleter {
let mut completion = commands.to_vec();
completion.extend(config.read().repl_completions());
let mut completer =