JuliaIO / LibExpat.jl

Julia interface to the Expat XML parser library
Other
9 stars 32 forks source link

Replace `search(s, t)` with `something(findfirst(t, s), 0:-1)` #101

Closed DilumAluthge closed 4 years ago

DilumAluthge commented 4 years ago

The search function has been removed from Julia. (It was deprecated in Julia 0.7 and removed in Julia 1.0).

This pull request replaces all uses of search(s::AbstractString, t::AbstractString) with something(findfirst(t, s), 0:-1).

cc: @musm @vtjnash

DilumAluthge commented 4 years ago

Note: WinRPM.install is currently broken because of the use of search in LibExpat.jl.

codecov[bot] commented 4 years ago

Codecov Report

Merging #101 into master will decrease coverage by 1.34%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #101      +/-   ##
==========================================
- Coverage   30.21%   28.86%   -1.35%     
==========================================
  Files           4        4              
  Lines        1026     1150     +124     
==========================================
+ Hits          310      332      +22     
- Misses        716      818     +102
Impacted Files Coverage Δ
src/xpath.jl 11.73% <0%> (-0.27%) :arrow_down:
src/LibExpat.jl 81.28% <0%> (-0.08%) :arrow_down:
src/streaming.jl 77.19% <0%> (+0.61%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8e590a1...8e8f64b. Read the comment docs.

musm commented 4 years ago

Should I go ahead and merge and tag then?

DilumAluthge commented 4 years ago

Should I go ahead and merge and tag then?

Yeah that might be good. Then I can finish fixing WinRPM.

musm commented 4 years ago

These changes look good to me. I'll wait until CI and if they pass will merge and tag.