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:
parent
d8f44ed905
commit
8ff0f623b4
|
@ -589,8 +589,8 @@ template makeLimitedUInt*(T: untyped, limit: SomeUnsignedInt) =
|
||||||
template asInt*(x: T): int = int(distinctBase(x))
|
template asInt*(x: T): int = int(distinctBase(x))
|
||||||
template asUInt64*(x: T): uint64 = uint64(distinctBase(x))
|
template asUInt64*(x: T): uint64 = uint64(distinctBase(x))
|
||||||
|
|
||||||
template toSszType(x: T): uint64 =
|
func toSszType*(x: T): uint64 {.error:
|
||||||
{.error: "Limited types should not be used with SSZ (ABI differences)".}
|
"Limited types should not be used with SSZ (ABI differences)".}
|
||||||
|
|
||||||
template makeLimitedU8*(T: untyped, limit: uint8) =
|
template makeLimitedU8*(T: untyped, limit: uint8) =
|
||||||
makeLimitedUInt(T, limit)
|
makeLimitedUInt(T, limit)
|
||||||
|
|
Loading…
Reference in New Issue