fmt: add a space around single-line `unsafe` expressions (#7505)
parent
b27f5c378c
commit
214290d55b
|
@ -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, µsecond, charptr(&plus_min_z), &offset_hour, &offset_minute)}
|
&minute, &second, µsecond, 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,
|
||||||
|
|
Loading…
Reference in New Issue