mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
v: remove the automatic passing of structs with more than 8 fields by reference (related #17159) (#22547)
This commit is contained in:
parent
5f413f48f8
commit
e97036a25b
45 changed files with 146 additions and 175 deletions
|
@ -456,14 +456,14 @@ pub fn (mut ws Client) set_state(state State) {
|
|||
}
|
||||
|
||||
// get_state return the current state of the websocket connection
|
||||
pub fn (ws Client) get_state() State {
|
||||
pub fn (ws &Client) get_state() State {
|
||||
return rlock ws.client_state {
|
||||
ws.client_state.state
|
||||
}
|
||||
}
|
||||
|
||||
// assert_not_connected returns error if the connection is not connected
|
||||
fn (ws Client) assert_not_connected() ! {
|
||||
fn (ws &Client) assert_not_connected() ! {
|
||||
match ws.get_state() {
|
||||
.connecting { return error('connect: websocket is connecting') }
|
||||
.open { return error('connect: websocket already open') }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue