Skip to content

Commit a393c6f

Browse files
authored
Remove unused variable from endswith (#56934)
This is a trivial code cleanup suggestion. The `cub` variable was unused in `endswith(::Union{String, SubString{String}}, ::Union{String, SubString{String}})`. I ran the tests with `make test`, there were some failures but they did not appear to be related to the change.
1 parent 27b44cf commit a393c6f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

base/strings/util.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ Base.startswith(io::IO, prefix::AbstractString) = startswith(io, String(prefix))
100100

101101
function endswith(a::Union{String, SubString{String}},
102102
b::Union{String, SubString{String}})
103-
cub = ncodeunits(b)
104103
astart = ncodeunits(a) - ncodeunits(b) + 1
105104
if astart < 1
106105
false

0 commit comments

Comments
 (0)