mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vlib/context: some clean up and more readable examples (#9868)
This commit is contained in:

committed by
GitHub

parent
44902b5aba
commit
3c8d2bbaec
@ -47,7 +47,7 @@ pub fn with_deadline(parent Context, d time.Time) Context {
|
||||
return Context(ctx)
|
||||
}
|
||||
|
||||
if ctx.err().str() == 'none' {
|
||||
if ctx.err() is none {
|
||||
go fn (mut ctx TimerContext, dur time.Duration) {
|
||||
time.sleep(dur)
|
||||
ctx.cancel(true, deadline_exceeded)
|
||||
|
Reference in New Issue
Block a user