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:

committed by
GitHub

parent
66294e359a
commit
909c9c7ee7
@ -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 {
|
||||
|
Reference in New Issue
Block a user