red-blox / zap

A lightning fast networking solution for roblox.
https://zap.redblox.dev
MIT License
89 stars 14 forks source link

[BUG] Zap fails to get the proper max size of enums #115

Closed EncodedVenom closed 2 months ago

EncodedVenom commented 2 months ago

Describe the bug

Zap fails to get the max size of an enum type and defaults to 255 as its max value.

This does not cause an error, but a warning is generated saying "potentially oversize" due to this behavior in certain situations.

Reproduction

playground link

Expected behavior

Zap should infer the proper max size

Additional context

https://github.com/red-blox/zap/blob/0.6.x/zap/src/config.rs#L258

image

EncodedVenom commented 2 months ago

Linked PR got merged

image