diff options
| -rw-r--r-- | xmake/core/base/hashset.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/core/base/hashset.lua b/xmake/core/base/hashset.lua index ecdfe72fb..5d0ea761e 100644 --- a/xmake/core/base/hashset.lua +++ b/xmake/core/base/hashset.lua @@ -263,7 +263,11 @@ end -- construct from an array function hashset.from(array) - return hashset.of(table.unpack(array)) + local result = hashset.new() + for i = 1, #array do + result:insert(array[i]) + end + return result end -- new hashset |
