From b8f85e4270de24155a6e468937d321bf66871ae3 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Fri, 25 Aug 2023 02:50:15 +0100 Subject: [PATCH] refactor: CountDigits is Pure. also honour methodimpl --- X10D/src/Math/BinaryIntegerExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/X10D/src/Math/BinaryIntegerExtensions.cs b/X10D/src/Math/BinaryIntegerExtensions.cs index 9029e6f..582c624 100644 --- a/X10D/src/Math/BinaryIntegerExtensions.cs +++ b/X10D/src/Math/BinaryIntegerExtensions.cs @@ -16,6 +16,8 @@ public static class BinaryIntegerExtensions /// /// The value whose digit count to compute. /// The number of digits in . + [Pure] + [MethodImpl(CompilerResources.MethodImplOptions)] public static int CountDigits(this TNumber value) where TNumber : IBinaryInteger {