From ae41bcfb0f67016a2213f72036e29a22639f4430 Mon Sep 17 00:00:00 2001 From: Tanguy Date: Wed, 3 Aug 2022 14:32:47 +0200 Subject: [PATCH] Fixes for styleCheck:usages --- config.nims | 6 ++++++ questionable/private/binderror.nim | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.nims b/config.nims index 7c9db32..7e2fa23 100644 --- a/config.nims +++ b/config.nims @@ -1,3 +1,9 @@ +--styleCheck:usages +if (NimMajor, NimMinor) < (1, 6): + --styleCheck:hint +else: + --styleCheck:error + # begin Nimble config (version 1) when fileExists("nimble.paths"): include "nimble.paths" diff --git a/questionable/private/binderror.nim b/questionable/private/binderror.nim index bf23195..372f256 100644 --- a/questionable/private/binderror.nim +++ b/questionable/private/binderror.nim @@ -1,6 +1,6 @@ import std/options -var captureEnabled {.global, compiletime.}: bool +var captureEnabled {.global, compileTime.}: bool var errorVariable: ptr ref CatchableError template captureBindError*(error: var ref CatchableError, expression): auto =