Skip to content

Commit cb4d235

Browse files
committed
Drop compat code for indexin from #515
1 parent 53e7c3a commit cb4d235

File tree

4 files changed

+3
-20
lines changed

4 files changed

+3
-20
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ Currently, the `@compat` macro supports the following syntaxes:
107107

108108
## Renaming
109109

110-
* `Compat.indexin` accepts any iterable as first argument, returns `nothing` (rather than `0`)
111-
for entries with no match and gives the index of the first (rather than the last) match
112-
([#25662], [#25998]).
113-
114110
* `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`,
115111
`uppercasefirst` and `lowercasefirst` ([#26442]).
116112

src/Compat.jl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,6 @@ end
7676
end
7777
end
7878

79-
if VERSION < v"0.7.0-DEV.3972"
80-
function indexin(a, b::AbstractArray)
81-
inds = keys(b)
82-
bdict = Dict{eltype(b),eltype(inds)}()
83-
for (val, ind) in zip(b, inds)
84-
get!(bdict, val, ind)
85-
end
86-
return Union{eltype(inds), Nothing}[
87-
get(bdict, i, nothing) for i in a
88-
]
89-
end
90-
end
91-
9279
if VERSION < v"0.7.0-DEV.4585"
9380
export isuppercase, islowercase, uppercasefirst, lowercasefirst
9481
const isuppercase = isupper

test/old.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,3 +859,6 @@ mktempdir(@__DIR__) do dir
859859
end
860860
@test readdir(dir) == ["dest.jl"]
861861
end
862+
863+
# 0.7.0-DEV.3972
864+
@test Compat.indexin([1, 2], [1, 0, 1]) == [1, nothing]

test/runtests.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ end
8282

8383
@test codeunit("foo") == codeunit(SubString("fooαβγ",1,3)) == UInt8
8484

85-
# 0.7.0-DEV.3972
86-
@test Compat.indexin([1, 2], [1, 0, 1]) == [1, nothing]
87-
8885
# 0.7.0-DEV.4585
8986
@test isuppercase('A')
9087
@test !isuppercase('a')

0 commit comments

Comments
 (0)