Skip to content

Commit c318936

Browse files
authored
Revert spacing in Base.show (#148)
* revert spacings in Base.show * bump version to v0.7.6
1 parent 5f3bf67 commit c318936

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "IntervalSets"
22
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
3-
version = "0.7.5"
3+
version = "0.7.6"
44

55
[deps]
66
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

src/interval.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ Construct a ClosedInterval `iv` spanning the region from
9494
±(x, y) = ClosedInterval(x - y, x + y)
9595
±(x::CartesianIndex, y::CartesianIndex) = ClosedInterval(x-y, x+y)
9696

97-
show(io::IO, I::ClosedInterval) = print(io, leftendpoint(I), " .. ", rightendpoint(I))
98-
show(io::IO, I::OpenInterval) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (open)")
99-
show(io::IO, I::Interval{:open,:closed}) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (open-closed)")
100-
show(io::IO, I::Interval{:closed,:open}) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (closed-open)")
97+
show(io::IO, I::ClosedInterval) = print(io, leftendpoint(I), "..", rightendpoint(I))
98+
show(io::IO, I::OpenInterval) = print(io, leftendpoint(I), "..", rightendpoint(I), " (open)")
99+
show(io::IO, I::Interval{:open,:closed}) = print(io, leftendpoint(I), "..", rightendpoint(I), " (open-closed)")
100+
show(io::IO, I::Interval{:closed,:open}) = print(io, leftendpoint(I), "..", rightendpoint(I), " (closed-open)")
101101

102102
# The following are not typestable for mixed endpoint types
103103
_left_intersect_type(::Type{Val{:open}}, ::Type{Val{L2}}, a1, a2) where L2 = a1 < a2 ? (a2,L2) : (a1,:open)

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct IncompleteInterval <: AbstractInterval{Int} end
3636
I = 0..3
3737
@test I === ClosedInterval(0,3) === ClosedInterval{Int}(0,3) ===
3838
Interval(0,3)
39-
@test string(I) == "0 .. 3"
39+
@test string(I) == "0..3"
4040
@test @inferred(UnitRange(I)) === 0:3
4141
@test @inferred(range(I)) === 0:3
4242
@test @inferred(UnitRange{Int16}(I)) === Int16(0):Int16(3)
@@ -47,7 +47,7 @@ struct IncompleteInterval <: AbstractInterval{Int} end
4747
K = 5..4
4848
L = 3 ± 2
4949
M = @inferred(ClosedInterval(2, 5.0))
50-
@test string(M) == "2.0 .. 5.0"
50+
@test string(M) == "2.0..5.0"
5151
N = @inferred(ClosedInterval(UInt8(255), 300))
5252

5353
x, y = CartesianIndex(1, 2, 3, 4), CartesianIndex(1, 2, 3, 4)

0 commit comments

Comments
 (0)