remove unused `type` in `makeLimitedUInt` (#5354)

The `type L` definition inside `makeLimitedUInt` is unused. Remove it.
This commit is contained in:
Etan Kissling 2023-08-25 11:28:52 +02:00 committed by GitHub
parent 758c503a52
commit 9637d3f8d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -550,10 +550,6 @@ func getImmutableValidatorData*(validator: Validator): ImmutableValidatorData2 =
withdrawal_credentials: validator.withdrawal_credentials) withdrawal_credentials: validator.withdrawal_credentials)
template makeLimitedUInt*(T: untyped, limit: SomeUnsignedInt) = template makeLimitedUInt*(T: untyped, limit: SomeUnsignedInt) =
# A "tigher" type is often used for T, but for the range check to be effective
# it must make sense..
type L = typeof limit
static: doAssert limit <= distinctBase(T).high() static: doAssert limit <= distinctBase(T).high()
# Many `uint64` values in the spec have a more limited range of valid values # Many `uint64` values in the spec have a more limited range of valid values
func init*(t: type T, value: uint64): Result[T, cstring] = func init*(t: type T, value: uint64): Result[T, cstring] =