From 8feb684574b7c4659c1b60b8ba8ab7e7b08a52ba Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 7 Jul 2021 09:19:44 +0200 Subject: [PATCH] Fix "unused variable" warnings --- questionable/binding.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/questionable/binding.nim b/questionable/binding.nim index 3bf3c28..a88ffa7 100644 --- a/questionable/binding.nim +++ b/questionable/binding.nim @@ -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