fix(diff): cast tonumber result to integer
Problem: LuaLS infers priority as integer from the = 0 initialiser but tonumber returns number?, causing a cast-local-type diagnostic. Solution: inline --[[@as integer]] cast after the tonumber call.
This commit is contained in:
parent
8f9052bad1
commit
437944d441
1 changed files with 1 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ function M.parse_buffer(lines)
|
|||
local prio_str = stripped:match('^%[(%d+)%] ')
|
||||
local priority = 0
|
||||
if prio_str then
|
||||
priority = tonumber(prio_str)
|
||||
priority = tonumber(prio_str) --[[@as integer]]
|
||||
stripped = stripped:sub(#prio_str + 4)
|
||||
end
|
||||
local description, metadata = parse.body(stripped)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue