aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authorGokul Soumya2022-03-15 08:04:22 +0000
committerGitHub2022-03-15 08:04:22 +0000
commit2b0835b295bbf57a171210be967e039a1bddf823 (patch)
treef9a61e0458d9015da85bacf1a1ad4e433b8db38c /helix-core/src
parent0902ede7b1d4c7edb8b039235456d552aaf44679 (diff)
Refactor :set to parse by deserializing values (#1799)
* Refactor :set to parse by deserializing values * Implement serialize for idle_timeout config
Diffstat (limited to 'helix-core/src')
-rw-r--r--helix-core/src/syntax.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 3b2d56d1..3fc91efc 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -216,14 +216,7 @@ impl FromStr for AutoPairConfig {
// only do bool parsing for runtime setting
fn from_str(s: &str) -> Result<Self, Self::Err> {
let enable: bool = s.parse()?;
-
- let enable = if enable {
- AutoPairConfig::Enable(true)
- } else {
- AutoPairConfig::Enable(false)
- };
-
- Ok(enable)
+ Ok(AutoPairConfig::Enable(enable))
}
}