fmt: add a space around single-line `unsafe` expressions (#7505)

pull/7525/head
spaceface 2020-12-23 19:13:42 +01:00 committed by GitHub
parent b27f5c378c
commit 214290d55b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 108 additions and 108 deletions

View File

@ -66,8 +66,8 @@ fn parse_iso8601_time(s string) ?(int, int, int, int, i64, bool) {
plus_min_z := `a` plus_min_z := `a`
offset_hour := 0 offset_hour := 0
offset_minute := 0 offset_minute := 0
mut count := unsafe {C.sscanf(charptr(s.str), '%2d:%2d:%2d.%6d%c%2d:%2d', &hour, &minute, mut count := unsafe { C.sscanf(charptr(s.str), '%2d:%2d:%2d.%6d%c%2d:%2d', &hour,
&second, &microsecond, charptr(&plus_min_z), &offset_hour, &offset_minute)} &minute, &second, &microsecond, charptr(&plus_min_z), &offset_hour, &offset_minute) }
// Missread microsecond ([Sec Hour Minute].len == 3 < 4) // Missread microsecond ([Sec Hour Minute].len == 3 < 4)
if count < 4 { if count < 4 {
count = unsafe { C.sscanf(charptr(s.str), '%2d:%2d:%2d%c%2d:%2d', &hour, &minute, count = unsafe { C.sscanf(charptr(s.str), '%2d:%2d:%2d%c%2d:%2d', &hour, &minute,