Skip to content

Commit

Permalink
Removed unnecessary tostring call (#1192)
Browse files Browse the repository at this point in the history
`table.concat` is guaranteed to return a string according to Lua docs.

Unless the `tostring` call is there to simulate behavior of global tostring function being replaced, which I assume is not the reason
  • Loading branch information
ccuser44 committed Mar 18, 2023
1 parent 74b232a commit a8c708e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/ustring.lua
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function _meta.__eq(ustr1,ustr2)
end

function _meta.__tostring(self)
return tostring(table.concat(self))
return table.concat(self)
end

function _meta.__concat(ustr1,ustr2)
Expand Down

0 comments on commit a8c708e

Please sign in to comment.