From 87aec71e080dc9c15f3dd0059dbc91686f3de4e6 Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 7 Nov 2023 10:21:17 +0800 Subject: refactor: use &GlobalConfig to avoid clone (#217) --- src/repl/prompt.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/repl/prompt.rs') diff --git a/src/repl/prompt.rs b/src/repl/prompt.rs index b4c9099..827f84d 100644 --- a/src/repl/prompt.rs +++ b/src/repl/prompt.rs @@ -15,8 +15,10 @@ pub struct ReplPrompt { } impl ReplPrompt { - pub fn new(config: GlobalConfig) -> Self { - Self { config } + pub fn new(config: &GlobalConfig) -> Self { + Self { + config: config.clone(), + } } } -- cgit v1.2.3