about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-10-25 12:35:11 +0200
committerbptato <nincsnevem662@gmail.com>2023-10-25 12:48:30 +0200
commit3f0a183d48a44cbbe642842fb60b69cca9e83390 (patch)
tree0aad7dfeaa3a9265e030b2ed2739de4e042a69a2 /src/config
parentb6e5390ec286747ce6789f9cfec54dec8dc18fa3 (diff)
downloadchawan-3f0a183d48a44cbbe642842fb60b69cca9e83390.tar.gz
reduce new() usage
Diffstat (limited to 'src/config')
-rw-r--r--src/config/config.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/config.nim b/src/config/config.nim
index 63438c55..3d2769d4 100644
--- a/src/config/config.nim
+++ b/src/config/config.nim
@@ -619,7 +619,7 @@ proc parseConfig*(config: Config, dir: string, s: string, name = "<input>",
   config.parseConfig(dir, newStringStream(s), name, laxnames)
 
 proc staticReadConfig(): ConfigObj =
-  var config = new(Config)
+  var config = Config()
   config.parseConfig("res", staticRead"res/config.toml", "config.toml")
   return config[]
 
@@ -637,7 +637,7 @@ proc getLinedAction*(config: Config, s: string): string =
   return config.line.getOrDefault(s)
 
 proc readConfig*(): Config =
-  new(result)
+  result = Config()
   result[] = defaultConfig
   when defined(debug):
     result.readConfig(getCurrentDir() / "res")