fix: resolve compiler warnings

- websocket.v: fix signed type shift warning by casting to u32
- openapi.v: add or {} block for map indexing with sum type values
This commit is contained in:
meiseayoung
2026-01-07 14:25:26 +08:00
parent afbb6586fa
commit fa26a136e6
2 changed files with 95 additions and 95 deletions
+1 -1
View File
@@ -367,7 +367,7 @@ pub fn parse_close_frame(payload []u8) (int, string) {
mut reason := ''
if payload.len >= 2 {
code = int(payload[0]) << 8 | int(payload[1])
code = int(u32(payload[0]) << 8) | int(payload[1])
if payload.len > 2 {
reason = payload[2..].bytestr()
}