Fix "unused variable" warnings
This commit is contained in:
parent
4a1783c472
commit
8feb684574
|
@ -7,12 +7,12 @@ proc option[T](option: Option[T]): Option[T] =
|
|||
template bindLet(name, expression): bool =
|
||||
let option = expression.option
|
||||
const default = typeof(option.unsafeGet()).default
|
||||
let name = if option.isSome: option.unsafeGet() else: default
|
||||
let name {.used.} = if option.isSome: option.unsafeGet() else: default
|
||||
option.isSome
|
||||
|
||||
template bindVar(name, expression): bool =
|
||||
let option = expression.option
|
||||
var name : typeof(option.unsafeGet())
|
||||
var name {.used.} : typeof(option.unsafeGet())
|
||||
if option.isSome:
|
||||
name = option.unsafeGet()
|
||||
option.isSome
|
||||
|
|
Loading…
Reference in New Issue