summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-08 11:58:50 +0800
committerGitHub <noreply@github.com>2023-03-08 11:58:50 +0800
commitf694a59dccef877a026c043cee236f57a93033a6 (patch)
tree6e67db7939474606aaae9bb01b765b8a4c4784da /src/config.rs
parentb7cb6f89f137e20f1d6dbb1f66e40f319c978a45 (diff)
downloadaichat-f694a59dccef877a026c043cee236f57a93033a6.tar.gz
refactor: replace dump with print_now! (#35)
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs
index 8ac99b7..21784c5 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -163,9 +163,9 @@ impl Config {
Some(role) => {
let output = format!("{}>> {}", role.name, role.prompt.trim());
self.role = Some(role);
- format!("{}\n", output.trim())
+ output
}
- None => "Error: Unknown role\n".into(),
+ None => "Error: Unknown role".into(),
}
}
@@ -278,7 +278,7 @@ impl Config {
let value = value.parse().with_context(|| "Invalid value")?;
self.dry_run = value;
}
- _ => return Ok(format!("Error: Unknown key `{key}`\n")),
+ _ => return Ok(format!("Error: Unknown key `{key}`")),
}
Ok("".into())
}