From 957ea431c23dd6cbaa512e6a67b4a25e2adf08e4 Mon Sep 17 00:00:00 2001 From: sigoden Date: Sun, 5 Mar 2023 19:48:22 +0800 Subject: refactor: rename config.no_highlight to highlight (#19) --- src/config.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/config.rs') 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, /// 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 +} -- cgit v1.2.3