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

context: small refactor to always use Context type instead of multiple types (#9705)

This commit is contained in:
Ulises Jeremias Cornejo Fandos
2021-04-13 01:04:13 -03:00
committed by GitHub
parent 66294e359a
commit 909c9c7ee7
9 changed files with 108 additions and 108 deletions

View File

@ -61,7 +61,7 @@ pub interface Context {
// initialization, and tests, and as the top-level Context for incoming
// requests.
pub fn background() Context {
return Context(context.background)
return context.background
}
// todo returns an empty Context. Code should use todo when
@ -69,7 +69,7 @@ pub fn background() Context {
// surrounding function has not yet been extended to accept a Context
// parameter).
pub fn todo() Context {
return Context(context.todo)
return context.todo
}
fn context_name(ctx Context) string {