Skip to content

Commit

Permalink
remove some unnecessary string overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Jul 12, 2024
1 parent 36839e5 commit 53cfe22
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/InlineStrings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -613,13 +613,11 @@ end
return n
end

const BaseStrs = Union{Char, String, SubString{String}}

Base.string(a::InlineString) = a
Base.string(a::InlineString...) = _string(a...)
Base.string(a::BaseStrs, b::InlineString) = _string(a, b)
Base.string(a::BaseStrs, b::BaseStrs, c::InlineString) = _string(a, b, c)

@inline function _string(a::Union{BaseStrs, InlineString}...)
@inline function _string(a::InlineString...)
n = 0
for v in a
if v isa Char
Expand Down

0 comments on commit 53cfe22

Please sign in to comment.