Skip to content

Commit

Permalink
remove unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
kbkpbot committed Jan 3, 2025
1 parent 9364c5b commit 89a9698
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vlib/v/live/common.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ pub fn info() &LiveReloadInfo {
// crashes. In this case, the background reloader thread is not
// started, and the structure LiveReloadInfo will not get updated.
// All its fields will be 0, but still safe to access.
unsafe {
C.g_live_info = int(&LiveReloadInfo{})
}
C.g_live_info = int(&LiveReloadInfo{})
}
return unsafe { &LiveReloadInfo(C.g_live_info) }
return &LiveReloadInfo(C.g_live_info)
}

0 comments on commit 89a9698

Please sign in to comment.