Skip to content

Commit

Permalink
Drop compat code for textwidth from #644
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 563f2bf commit 221984a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* `reprmime(mime, x)` is now `repr(mime, x)` ([#25990]) and `mimewritable` is now `showable` ([#26089]).

* `strwidth` and `charwidth` are now merged into `textwidth` ([#23667]).

* `Associative` is now `AbstractDict` ([#25012]).

* `indices` is now `axes` ([#25057]). This function is not exported from Compat to avoid
Expand Down
12 changes: 0 additions & 12 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,6 @@ const tr = LinearAlgebra.tr

include("compatmacro.jl")

if VERSION < v"0.7.0-DEV.1930"
# no textwidth definition in Base
export textwidth
textwidth(c::Char) = charwidth(c)
textwidth(c::AbstractString) = strwidth(c)
elseif v"0.7.0-DEV.2915" VERSION < v"0.7.0-DEV.3393"
# textwidth definition moved to Unicode module
import Unicode
const textwidth = Unicode.textwidth
export textwidth
end

# 0.7.0-DEV.2915
module Unicode
export graphemes, textwidth, isvalid,
Expand Down
4 changes: 4 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -546,3 +546,7 @@ end
@test ComplexF16 === Complex{Float16}
@test ComplexF32 === Complex{Float32}
@test ComplexF64 === Complex{Float64}

# 0.7.0-DEV.1930
@test textwidth("A") == 1
@test textwidth('A') == 1
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ if VERSION < v"0.7.0-DEV.880"
end
end

# 0.7.0-DEV.1930
@test textwidth("A") == 1
@test textwidth('A') == 1

# 0.7
let A = [1]
local x = 0
Expand Down

0 comments on commit 221984a

Please sign in to comment.