Skip to content

Commit

Permalink
Apply JuliaFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Mar 5, 2022
1 parent baa89fb commit 76b68fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/library.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ complete(rf::R_{Dedupe}, result) = complete(inner(rf), unwrap(rf, result)[2])

@inline next(rf::R_{Dedupe}, result, input) =
wrapping(rf, result) do prev, iresult
if prev isa Unseen || !xform(rf).eq(prev,input)
if prev isa Unseen || !xform(rf).eq(prev, input)
return input, next(inner(rf), iresult, input)
else
return input, iresult
Expand Down
14 changes: 6 additions & 8 deletions test/test_library.jl
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,12 @@ end
end

@testset for xs in iterator_variants([
(;counter=1, value=:foo),
(;counter=2, value=:foo),
(;counter=3 , value=:bar)
])
@test xs |> Dedupe((x,y) -> x.value==y.value) |> collect == [
(;counter=1, value=:foo),
(;counter=3 , value=:bar)
]
(; counter = 1, value = :foo),
(; counter = 2, value = :foo),
(; counter = 3, value = :bar),
])
@test xs |> Dedupe((x, y) -> x.value == y.value) |> collect ==
[(; counter = 1, value = :foo), (; counter = 3, value = :bar)]
end
end

Expand Down

0 comments on commit 76b68fc

Please sign in to comment.