From 2b0835b295bbf57a171210be967e039a1bddf823 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Tue, 15 Mar 2022 13:34:22 +0530 Subject: Refactor :set to parse by deserializing values (#1799) * Refactor :set to parse by deserializing values * Implement serialize for idle_timeout config--- helix-core/src/syntax.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'helix-core/src') 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 { let enable: bool = s.parse()?; - - let enable = if enable { - AutoPairConfig::Enable(true) - } else { - AutoPairConfig::Enable(false) - }; - - Ok(enable) + Ok(AutoPairConfig::Enable(enable)) } } -- cgit v1.2.3-70-g09d2