change unused template to unused func (#5355)

The intentionally unused `toSszType` template may trigger warnings
as it is unused. Replacing it with an `{.error.}` `func` prevents that.
This commit is contained in:
Etan Kissling 2023-08-25 13:09:13 +02:00 committed by GitHub
parent d8f44ed905
commit 8ff0f623b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -589,8 +589,8 @@ template makeLimitedUInt*(T: untyped, limit: SomeUnsignedInt) =
template asInt*(x: T): int = int(distinctBase(x))
template asUInt64*(x: T): uint64 = uint64(distinctBase(x))
template toSszType(x: T): uint64 =
{.error: "Limited types should not be used with SSZ (ABI differences)".}
func toSszType*(x: T): uint64 {.error:
"Limited types should not be used with SSZ (ABI differences)".}
template makeLimitedU8*(T: untyped, limit: uint8) =
makeLimitedUInt(T, limit)