mirror of
https://github.com/status-im/nim-confutils.git
synced 2025-01-09 19:55:58 +00:00
explicitly initialize result
(#89)
In Nim 2.0, `'result' requires explicit initialization`. Fix `makeDefaultValue` to do so.
This commit is contained in:
parent
d784b823be
commit
674c9e4c8e
@ -629,7 +629,7 @@ template setField[T](loc: var seq[T], val: Option[string], defaultVal: untyped)
|
|||||||
loc = FieldType(defaultVal)
|
loc = FieldType(defaultVal)
|
||||||
|
|
||||||
func makeDefaultValue*(T: type): T =
|
func makeDefaultValue*(T: type): T =
|
||||||
discard
|
default(T)
|
||||||
|
|
||||||
func requiresInput*(T: type): bool =
|
func requiresInput*(T: type): bool =
|
||||||
not ((T is seq) or (T is Option) or (T is bool))
|
not ((T is seq) or (T is Option) or (T is bool))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user