From 10b7f6c5094a36175c815c899b7c03dcf7b61992 Mon Sep 17 00:00:00 2001 From: Moritz Schauer Date: Thu, 10 Nov 2022 15:38:17 +0100 Subject: [PATCH] Use inline in the combinations iterator --- src/combinations.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/combinations.jl b/src/combinations.jl index bc8898d..85e0acf 100644 --- a/src/combinations.jl +++ b/src/combinations.jl @@ -11,7 +11,7 @@ struct Combinations{T} t::Int end -function Base.iterate(c::Combinations, s = collect(1:c.t)) +@inline function Base.iterate(c::Combinations, s = collect(1:c.t)) (!isempty(s) && s[1] > length(c.a) - c.t + 1) && return comb = [c.a[si] for si in s]