fix: push_str instead of write macro

Co-authored-by: Filip Tibell <filip.tibell@gmail.com>
This commit is contained in:
Erica Marigold 2023-08-15 11:34:00 +05:30 committed by GitHub
parent 682bf7cee1
commit a2de4eb70b
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ pub async fn show_interface(cmd: Command) -> Result<ExitCode> {
match repl.readline(prompt) {
Ok(code) => {
if prompt_state == PromptState::Continuation {
write!(&mut source_code, "{}", code)?;
source_code.push_str(&code);
} else if prompt_state == PromptState::Regular {
source_code = code.clone();
}