diff options
| author | sigoden <sigoden@gmail.com> | 2023-03-05 19:48:22 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-05 19:48:22 +0800 |
| commit | 957ea431c23dd6cbaa512e6a67b4a25e2adf08e4 (patch) | |
| tree | 334182bf2e730f8d422e855e120df9de94bed534 /src/config.rs | |
| parent | aadffb17a3cbbfc5e3c0dad4c8587eff79aaae9b (diff) | |
| download | aichat-957ea431c23dd6cbaa512e6a67b4a25e2adf08e4.tar.gz | |
refactor: rename config.no_highlight to highlight (#19)
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index 61a6998..802f376 100644 --- a/src/config.rs +++ b/src/config.rs @@ -27,8 +27,8 @@ pub struct Config { #[serde(default)] pub save: bool, /// Whether to disable highlight - #[serde(default)] - pub no_highlight: bool, + #[serde(default = "highlight_value")] + pub highlight: bool, /// Set proxy pub proxy: Option<String>, /// Used only for debugging @@ -195,3 +195,7 @@ fn create_config_file(config_path: &Path) -> Result<()> { std::fs::write(config_path, raw_config).with_context(|| "Failed to write to config file")?; Ok(()) } + +fn highlight_value() -> bool { + true +} |
