1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net: add unsafe block to int -> enum cast (#15961)

Fixes https://github.com/vlang/v/issues/15959
This commit is contained in:
Swastik Baranwal 2022-10-04 00:26:06 +05:30 committed by GitHub
parent 6ac9552d39
commit 267e26ba1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -736,7 +736,7 @@ pub enum WsaError {
// wsa_error casts an int to its WsaError value
pub fn wsa_error(code int) WsaError {
return WsaError(code)
return unsafe { WsaError(code) }
}
const (