Skip to content

Commit

Permalink
remove nil marshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
dndx committed Jan 13, 2022
1 parent 0d2a744 commit 8d79fbb
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions kong/db/declarative/marshaller.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ local marshallers = {
return fmt("%d:%s", value_type, str_value)
end,

shm_nil = function(at, ttl)
return "0:"
end,

[1] = function(number) -- number
return tostring(number)
end,
Expand All @@ -53,7 +49,7 @@ local marshallers = {

function _M.marshall(value)
if value == nil then
return marshallers.shm_nil()
return nil
end

local value_type = TYPES_LOOKUP[type(value)]
Expand All @@ -80,10 +76,6 @@ local unmarshallers = {
return str_value, tonumber(value_type)
end,

[0] = function() -- nil
return nil
end,

[1] = function(str) -- number
return tonumber(str)
end,
Expand Down

0 comments on commit 8d79fbb

Please sign in to comment.