diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-05 00:07:16 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-05 00:07:16 +0200 |
commit | c06bc25969bc428c3b2a32ee87525737cb5fef9f (patch) | |
tree | 17a90ad69fb3ae89e8923021dca6cfc105809875 /src/config | |
parent | 698b6002528750a7af0a0df9ccac8e05d6b923c8 (diff) | |
download | chawan-c06bc25969bc428c3b2a32ee87525737cb5fef9f.tar.gz |
Use isSome instead of isOk
no point in having identical overloads
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/config.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/config.nim b/src/config/config.nim index b38d3129..70f6995e 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -604,7 +604,7 @@ proc parseConfigValue(ctx: var ConfigParser; x: var ChaPathResolved; v: TomlValue; k: string) = typeCheck(v, tvtString, k) let y = ChaPath(v.s).unquote() - if y.isErr: + if y.isNone: raise newException(ValueError, y.error) x = ChaPathResolved(y.get) @@ -707,7 +707,7 @@ proc parseConfig(config: Config; dir: string; t: TomlValue): ParseConfigResult = proc parseConfig(config: Config; dir: string; stream: Stream; name = "<input>"; laxnames = false): ParseConfigResult = let toml = parseToml(stream, dir / name, laxnames) - if toml.isOk: + if toml.isSome: return config.parseConfig(dir, toml.get) else: return ParseConfigResult( |