Skip to content

Commit bbf1bde

Browse files
authored
move Bool annotation to definition of lt
1 parent 6352a5b commit bbf1bde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

base/sort.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ function sort!(v::AbstractVector, lo::Integer, hi::Integer, ::InsertionSortAlg,
519519
x = v[i]
520520
while j > lo
521521
y = v[j-1]
522-
if !(lt(o, x, y)::Bool)
522+
if !lt(o, x, y)
523523
break
524524
end
525525
v[j] = y
@@ -1486,8 +1486,8 @@ right(::DirectOrdering) = Right()
14861486
left(o::Perm) = Perm(left(o.order), o.data)
14871487
right(o::Perm) = Perm(right(o.order), o.data)
14881488

1489-
lt(::Left, x::T, y::T) where {T<:Floats} = slt_int(y, x)
1490-
lt(::Right, x::T, y::T) where {T<:Floats} = slt_int(x, y)
1489+
lt(::Left, x::T, y::T)::Bool where {T<:Floats} = slt_int(y, x)
1490+
lt(::Right, x::T, y::T)::Bool where {T<:Floats} = slt_int(x, y)
14911491

14921492
uint_map(x::Float16, ::Left) = ~reinterpret(UInt16, x)
14931493
uint_unmap(::Type{Float16}, u::UInt16, ::Left) = reinterpret(Float16, ~u)

0 commit comments

Comments
 (0)