mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
io: migrate the Reader
API to Result
instead of Option
(#15229)
This commit is contained in:
@ -180,8 +180,8 @@ pub fn (mut s SSLConn) socket_read_into_ptr(buf_ptr &u8, len int) ?int {
|
||||
return res
|
||||
}
|
||||
|
||||
pub fn (mut s SSLConn) read(mut buffer []u8) ?int {
|
||||
res := s.socket_read_into_ptr(&u8(buffer.data), buffer.len)?
|
||||
pub fn (mut s SSLConn) read(mut buffer []u8) !int {
|
||||
res := s.socket_read_into_ptr(&u8(buffer.data), buffer.len) or { return err }
|
||||
return res
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user