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

@@ -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