Skip to content

Commit dd2eaf5

Browse files
committed
Fix Vararg warnings
1 parent 60b17fe commit dd2eaf5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/combinators/power.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ end
2929

3030
# ToDo: Make rand return static arrays for statically-sized power measures.
3131

32-
function _cartidxs(axs::Tuple{Vararg{<:AbstractUnitRange,N}}) where {N}
32+
function _cartidxs(axs::Tuple{Vararg{AbstractUnitRange,N}}) where {N}
3333
CartesianIndices(map(_dynamic, axs))
3434
end
3535

@@ -49,16 +49,16 @@ function Base.rand(rng::AbstractRNG, ::Type{T}, d::PowerMeasure) where {T}
4949
end
5050
end
5151

52-
@inline _pm_axes(sz::Tuple{Vararg{<:IntegerLike,N}}) where {N} = map(one_to, sz)
53-
@inline _pm_axes(axs::Tuple{Vararg{<:AbstractUnitRange,N}}) where {N} = axs
52+
@inline _pm_axes(sz::Tuple{Vararg{IntegerLike,N}}) where {N} = map(one_to, sz)
53+
@inline _pm_axes(axs::Tuple{Vararg{AbstractUnitRange,N}}) where {N} = axs
5454

55-
@inline function powermeasure(x::T, sz::Tuple{Vararg{<:Any,N}}) where {T,N}
55+
@inline function powermeasure(x::T, sz::Tuple{Vararg{Any,N}}) where {T,N}
5656
PowerMeasure(x, _pm_axes(sz))
5757
end
5858

5959
marginals(d::PowerMeasure) = fill_with(d.parent, d.axes)
6060

61-
function Base.:^::AbstractMeasure, dims::Tuple{Vararg{<:AbstractArray,N}}) where {N}
61+
function Base.:^::AbstractMeasure, dims::Tuple{Vararg{AbstractArray,N}}) where {N}
6262
powermeasure(μ, dims)
6363
end
6464

src/combinators/smart-constructors.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ powermeasure(m::AbstractMeasure, ::Tuple{}) = m
2323

2424
function powermeasure(
2525
μ::WeightedMeasure,
26-
dims::Tuple{<:AbstractArray,Vararg{<:AbstractArray}},
26+
dims::Tuple{<:AbstractArray,Vararg{AbstractArray}},
2727
)
2828
k = mapreduce(length, *, dims) * μ.logweight
2929
return weightedmeasure(k, μ.base^dims)

src/static.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Returns an instance of `FillArrays.Fill`.
2929
"""
3030
function fill_with end
3131

32-
@inline function fill_with(x::T, sz::Tuple{Vararg{<:IntegerLike,N}}) where {T,N}
32+
@inline function fill_with(x::T, sz::Tuple{Vararg{IntegerLike,N}}) where {T,N}
3333
fill_with(x, map(one_to, sz))
3434
end
3535

36-
@inline function fill_with(x::T, axs::Tuple{Vararg{<:AbstractUnitRange,N}}) where {T,N}
36+
@inline function fill_with(x::T, axs::Tuple{Vararg{AbstractUnitRange,N}}) where {T,N}
3737
# While `FillArrays.Fill` (mostly?) works with axes that are static unit
3838
# ranges, some operations that automatic differentiation requires do fail
3939
# on such instances of `Fill` (e.g. `reshape` from dynamic to static size).

0 commit comments

Comments
 (0)