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
@@ -21,10 +21,7 @@ mut:
|
||||
// string or any other built-in type to avoid collisions between
|
||||
// packages using context. Users of with_value should define their own
|
||||
// types for keys
|
||||
pub fn with_value(parent Context, key string, value voidptr) &ValueContext {
|
||||
if isnil(key) {
|
||||
panic('nil key')
|
||||
}
|
||||
pub fn with_value(parent Context, key string, value voidptr) Context {
|
||||
return &ValueContext{
|
||||
context: parent
|
||||
key: key
|
||||
|
||||
Reference in New Issue
Block a user