Skip to content

Commit d54fa1b

Browse files
authored
remove some unnecessary string overloads (#77)
* remove some unnecessary `string` overloads * test updating invalidation script
1 parent 36839e5 commit d54fa1b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/Invalidations.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ jobs:
3030
- uses: julia-actions/julia-buildpkg@v1
3131
- uses: julia-actions/julia-invalidations@v1
3232
id: invs_default
33-
33+
3434
- name: Report invalidation counts
3535
run: |
3636
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
3737
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
3838
- name: Check if the PR does increase number of invalidations
39-
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
40-
run: exit 1
39+
run: |
40+
if [ ${{ steps.invs_pr.outputs.total }} -gt ${{ steps.invs_default.outputs.total }} ]; then
41+
exit 1
42+
fi

src/InlineStrings.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,13 +613,11 @@ end
613613
return n
614614
end
615615

616-
const BaseStrs = Union{Char, String, SubString{String}}
616+
617617
Base.string(a::InlineString) = a
618618
Base.string(a::InlineString...) = _string(a...)
619-
Base.string(a::BaseStrs, b::InlineString) = _string(a, b)
620-
Base.string(a::BaseStrs, b::BaseStrs, c::InlineString) = _string(a, b, c)
621619

622-
@inline function _string(a::Union{BaseStrs, InlineString}...)
620+
@inline function _string(a::InlineString...)
623621
n = 0
624622
for v in a
625623
if v isa Char

0 commit comments

Comments
 (0)