1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

pg, sqlite, mysql: run vfmt (#6650)

This commit is contained in:
Lukas Neubert
2020-10-19 20:11:04 +02:00
committed by GitHub
parent 37d6503437
commit f37e936321
9 changed files with 160 additions and 130 deletions

View File

@ -2,7 +2,7 @@ module mysql
// get_error_msg returns error message from MySQL instance.
fn get_error_msg(conn &C.MYSQL) string {
return unsafe { C.mysql_error(conn).vstring() }
return unsafe {C.mysql_error(conn).vstring()}
}
// get_errno returns error number from MySQL instance.
@ -12,8 +12,10 @@ fn get_errno(conn &C.MYSQL) int {
// resolve_nil_str returns empty string if passed value is a nil pointer.
fn resolve_nil_str(ptr byteptr) string {
if isnil(ptr) { return '' }
return unsafe { ptr.vstring() }
if isnil(ptr) {
return ''
}
return unsafe {ptr.vstring()}
}
[inline]