Sleitnick / AeroGameFramework

AeroGameFramework is a Roblox game framework that makes development easy and fun. The framework is designed to simplify the communication between modules and seamlessly bridge the gap between the server and client.
https://sleitnick.github.io/AeroGameFramework/
MIT License
215 stars 57 forks source link

Fix redundant parameters #214

Closed cassis163 closed 3 years ago

cassis163 commented 3 years ago

My 'Roblox LSP' VSCode extension detected the usage of some redundant parameters in the Data module. This should make sense, since Data:SaveAll() does not expect any parameters.

function Data:SaveAll()
    if (self._destroyed) then
        return Promise.Reject("Data already destroyed")
    end
    -- Collect all 'Save' promises and return them all in a single promise:
    local promises = {}
    for key in pairs(self._cache) do
        promises[#promises + 1] = self:Save(key)
    end
    return Promise.All(promises)
end
cassis163 commented 3 years ago

Nevermind, someone already published a pull request for this in #211.