From 1f97c3eb2b0ba74c69cea0586f496f9d00c8777f Mon Sep 17 00:00:00 2001 From: Angel Ezquerra Date: Mon, 25 Mar 2024 23:15:09 +0100 Subject: [PATCH] Fix "imported and not used: 'datatypes' [UnusedImport]" warning The warning is fixed by only importing KnownSupportsCopyMem from datatypes when in nimdoc mode. --- .../laser/primitives/matrix_multiplication/gemm.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/arraymancer/laser/primitives/matrix_multiplication/gemm.nim b/src/arraymancer/laser/primitives/matrix_multiplication/gemm.nim index c51b0d7f..e900351d 100644 --- a/src/arraymancer/laser/primitives/matrix_multiplication/gemm.nim +++ b/src/arraymancer/laser/primitives/matrix_multiplication/gemm.nim @@ -11,7 +11,8 @@ import # This import is needed for our current docgen. Otherwise it fails # on this submodule. -from ../../tensor/datatypes import KnownSupportsCopyMem +when defined(nimdoc): + from ../../tensor/datatypes import KnownSupportsCopyMem when defined(i386) or defined(amd64): import ../../cpuinfo_x86