Skip to content

Commit

Permalink
Merge pull request #41 from yuyichao/0.7
Browse files Browse the repository at this point in the history
Fix depwarns on 0.7
  • Loading branch information
staticfloat authored Sep 13, 2017
2 parents d44d9d8 + cbe5481 commit e5f8a5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/SHA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ for (f, ctx) in [(:sha1, :SHA1_CTX),
end

# AbstractStrings are a pretty handy thing to be able to crunch through
$f(str::AbstractString) = $f(convert(Array{UInt8,1}, str))
$f(str::AbstractString) = $f(Vector{UInt8}(str))

# Convenience function for IO devices, allows for things like:
# open("test.txt") do f
Expand Down
7 changes: 5 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,11 @@ for sha_idx in 1:length(sha_funcs)
end
println("Done! [$(nerrors - nerrors_old) errors]")

if VERSION >= v"0.5.0-pre+5599" replstr(x) = sprint((io, x) -> show(IOContext(io, limit=true), MIME("text/plain"), x), x)
else replstr(x) = sprint((io, x) -> writemime(io, MIME("text/plain"), x), x) end
if VERSION >= v"0.7.0-DEV.1472"
replstr(x) = sprint((io, x) -> show(IOContext(io, :limit => true), MIME("text/plain"), x), x)
else
replstr(x) = sprint((io, x) -> show(IOContext(io, limit=true), MIME("text/plain"), x), x)
end

for idx in 1:length(ctxs)
# Part #1: copy
Expand Down

0 comments on commit e5f8a5c

Please sign in to comment.