From 267e26ba1d739a45abd0ded39ac3074aed17893c Mon Sep 17 00:00:00 2001 From: Swastik Baranwal Date: Tue, 4 Oct 2022 00:26:06 +0530 Subject: [PATCH] net: add unsafe block to int -> enum cast (#15961) Fixes https://github.com/vlang/v/issues/15959 --- vlib/net/net_windows.c.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/net/net_windows.c.v b/vlib/net/net_windows.c.v index 19695996d4..06a4aecf86 100644 --- a/vlib/net/net_windows.c.v +++ b/vlib/net/net_windows.c.v @@ -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 (