Skip to content

Commit 19b6040

Browse files
committed
style: trailing white spaces
1 parent 370d452 commit 19b6040

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/permutations.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ end
1616

1717
function has_repeats(state::Vector{Int})
1818
# This can be safely marked inbounds because of the type restriction in the signature.
19-
# If the type restriction is ever loosened, please check safety of the `@inbounds`
19+
# If the type restriction is ever loosened, please check safety of the `@inbounds`.
2020
@inbounds for outer in eachindex(state)
2121
for inner in (outer+1):lastindex(state)
2222
if state[outer] == state[inner]
@@ -98,7 +98,7 @@ permutations(a) = permutations(a, length(a))
9898
permutations(a, t)
9999
100100
Generate all size `t` permutations of an indexable object `a`.
101-
Only works for `a` with defined length.
101+
Only works for `a` with defined length.
102102
If `(t <= 0) || (t > length(a))`, then returns an empty vector of eltype of `a`
103103
104104
# Examples
@@ -124,7 +124,7 @@ julia> [ (len, collect(permutations(1:3, len))) for len in -1:4 ]
124124
"""
125125
function permutations(a, t::Integer)
126126
if t == 0
127-
# Correct behavior for a permutation of length 0 is a vector containing a single empty vector
127+
# Correct behavior for a permutation of length 0 is a vector containing a single empty vector
128128
return [Vector{eltype(a)}()]
129129
elseif t == 1
130130
# Easy case, just return each element in its own vector

test/permutations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ end
3030
@test collect(permutations([], -1)) == Any[]
3131
@test collect(permutations([], 0)) == [Any[]]
3232
@test collect(permutations([], 1)) == Any[]
33-
33+
3434
@testset "permutation lengths" begin
3535
expected_lengths = [1, 5, 20, 60, 120, 120]
3636
ks = 0:5

0 commit comments

Comments
 (0)