mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: automatic error propagation in place of "or { return(err) }"
This commit is contained in:
@@ -123,7 +123,7 @@ pub fn (db DB) exec_one(query string) ?Row {
|
||||
if e != '' {
|
||||
return error('pg exec error: "$e"')
|
||||
}
|
||||
row := rows_first_or_empty( res_to_rows(res) ) or { return error(err) }
|
||||
row := rows_first_or_empty( res_to_rows(res) )?
|
||||
return row
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user