Skip to content

Commit 221984a

Browse files
committed
Drop compat code for textwidth from #644
1 parent 563f2bf commit 221984a

File tree

4 files changed

+4
-18
lines changed

4 files changed

+4
-18
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ Currently, the `@compat` macro supports the following syntaxes:
157157

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

160-
* `strwidth` and `charwidth` are now merged into `textwidth` ([#23667]).
161-
162160
* `Associative` is now `AbstractDict` ([#25012]).
163161

164162
* `indices` is now `axes` ([#25057]). This function is not exported from Compat to avoid

src/Compat.jl

-12
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,6 @@ const tr = LinearAlgebra.tr
3838

3939
include("compatmacro.jl")
4040

41-
if VERSION < v"0.7.0-DEV.1930"
42-
# no textwidth definition in Base
43-
export textwidth
44-
textwidth(c::Char) = charwidth(c)
45-
textwidth(c::AbstractString) = strwidth(c)
46-
elseif v"0.7.0-DEV.2915" VERSION < v"0.7.0-DEV.3393"
47-
# textwidth definition moved to Unicode module
48-
import Unicode
49-
const textwidth = Unicode.textwidth
50-
export textwidth
51-
end
52-
5341
# 0.7.0-DEV.2915
5442
module Unicode
5543
export graphemes, textwidth, isvalid,

test/old.jl

+4
Original file line numberDiff line numberDiff line change
@@ -546,3 +546,7 @@ end
546546
@test ComplexF16 === Complex{Float16}
547547
@test ComplexF32 === Complex{Float32}
548548
@test ComplexF64 === Complex{Float64}
549+
550+
# 0.7.0-DEV.1930
551+
@test textwidth("A") == 1
552+
@test textwidth('A') == 1

test/runtests.jl

-4
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ if VERSION < v"0.7.0-DEV.880"
6969
end
7070
end
7171

72-
# 0.7.0-DEV.1930
73-
@test textwidth("A") == 1
74-
@test textwidth('A') == 1
75-
7672
# 0.7
7773
let A = [1]
7874
local x = 0

0 commit comments

Comments
 (0)