refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-09-05 10:26:04 +02:00
parent 7355cd90b6
commit 9a94641b28
2 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -38,7 +38,8 @@ do
end
function private.state.get()
for _, state in scan_states do if state.id == thread_id then return state end end
local _, state = next(filter(copy(scan_states), function(state) return state.id == thread_id end))
return state
end
end