Skip to content

Commit

Permalink
Merge pull request #28 from tbeason/widening
Browse files Browse the repository at this point in the history
Type Widening
  • Loading branch information
tk3369 committed Feb 11, 2018
2 parents c6f2d23 + 6189e8e commit 91a45b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Strip from the right end of the `bytes` array for any byte that matches the ones
specified in the `remove` argument. See Python's bytes.rstrip function.
"""
function brstrip(bytes::Vector{UInt8}, remove::Vector{UInt8})
function brstrip(bytes::AbstractVector{UInt8}, remove::AbstractVector{UInt8})
for i in length(bytes):-1:1
x = bytes[i]
found = false
Expand Down Expand Up @@ -36,7 +36,7 @@ end
"""
Find needle in the haystack with both `Vector{UInt8}` type arguments.
"""
function Base.contains(haystack::Vector{UInt8}, needle::Vector{UInt8})
function Base.contains(haystack::AbstractVector{UInt8}, needle::AbstractVector{UInt8})
hlen = length(haystack)
nlen = length(needle)
if hlen >= nlen
Expand Down

0 comments on commit 91a45b5

Please sign in to comment.