diff options
| author | Anthony Rubick <68485672+AnthonyMichaelTDM@users.noreply.github.com> | 2023-07-09 20:07:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-10 11:07:09 +0800 |
| commit | 97fc7de6754c8b5c383d7d5e3f9e26b3bbfb08fb (patch) | |
| tree | c19390877425fa50049761e8ee6bc93f21c46f56 /src/render/mod.rs | |
| parent | ec51b84290215d11d5045de8baa9b89f2447b1e9 (diff) | |
| download | aichat-97fc7de6754c8b5c383d7d5e3f9e26b3bbfb08fb.tar.gz | |
fix: minor code cleanup and pedantic lints (#134)
Diffstat (limited to 'src/render/mod.rs')
| -rw-r--r-- | src/render/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/render/mod.rs b/src/render/mod.rs index 5980302..20d4d0e 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -3,6 +3,7 @@ mod markdown; mod repl; use self::cmd::cmd_render_stream; +#[allow(clippy::module_name_repetitions)] pub use self::markdown::MarkdownRender; use self::repl::repl_render_stream; @@ -16,10 +17,11 @@ use crossbeam::channel::unbounded; use crossbeam::sync::WaitGroup; use std::thread::spawn; +#[allow(clippy::module_name_repetitions)] pub fn render_stream( input: &str, client: &ChatGptClient, - config: SharedConfig, + config: &SharedConfig, repl: bool, abort: SharedAbortSignal, wg: WaitGroup, @@ -30,9 +32,9 @@ pub fn render_stream( let abort_clone = abort.clone(); spawn(move || { let err = if repl { - repl_render_stream(rx, light_theme, abort) + repl_render_stream(&rx, light_theme, &abort) } else { - cmd_render_stream(rx, light_theme, abort) + cmd_render_stream(&rx, light_theme, &abort) }; if let Err(err) = err { let err = format!("{err:?}"); |
