Enforcing that Token is at most 32 bytes long.
This commit is contained in:
parent
e88842573f
commit
918395ea64
1 changed files with 2 additions and 0 deletions
|
|
@ -77,6 +77,8 @@ struct Token
|
||||||
/// Get string representation of the token ID.
|
/// Get string representation of the token ID.
|
||||||
@property string idString() @safe pure const {return id.to!string;}
|
@property string idString() @safe pure const {return id.to!string;}
|
||||||
}
|
}
|
||||||
|
static assert(Token.sizeof <= 32, "Token has unexpected size");
|
||||||
|
|
||||||
|
|
||||||
@safe pure nothrow @nogc:
|
@safe pure nothrow @nogc:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue