ci: fix toml segfault (remove unused low level builtin option IError.msg compatibility hack)

pull/14013/head^2
Delyan Angelov 2022-04-11 21:49:52 +03:00
parent e64c8cce62
commit 382586da6d
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 7 deletions

View File

@ -27,13 +27,9 @@ pub fn (err IError) str() string {
else { else {
// >> Hack to allow old style custom error implementations // >> Hack to allow old style custom error implementations
// TODO: remove once deprecation period for `IError` methods has ended // TODO: remove once deprecation period for `IError` methods has ended
old_error_style := unsafe { voidptr(&err.msg) != voidptr(&err.code) } // if fields are not defined (new style) they don't have an offset between // old_error_style := unsafe { voidptr(&err.msg) != voidptr(&err.code) } // if fields are not defined (new style) they don't have an offset between
if old_error_style { // <<
'$err.type_name(): $err.msg' '$err.type_name(): $err.msg()'
} else {
// <<
'$err.type_name(): $err.msg()'
}
} }
} }
} }