DataStructures.jl
DataStructures.jl copied to clipboard
Fix CircularBuffer inner constructor
What is this fixing? Can it have a test added that was failing before and now passes?
Nothing was actually broken before. The issue is that there is an inner constructor:
CircularBuffer{T}(f::Integer, len::Integer, buf::Integer) where {T} = CircularBuffer{T}(Int(f), Int(len), Int(buf))
which is incorrect, since buf is never an Integer/Int.
This constructor was already superfluous because of https://github.com/JuliaCollections/DataStructures.jl/pull/893#discussion_r1469114908 , so there's no change in behaviour, but this PR just implements the original intention in that linked PR.