Skip to content

Commit

Permalink
Fix readstring depwarns
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Aug 19, 2017
1 parent 5ad2429 commit 5914cdc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.4
julia 0.5
BenchmarkTools 0.0.7
Compat 0.19.0
Compat 0.30.0
JLD
2 changes: 1 addition & 1 deletion src/io/IOBenchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ g = addgroup!(SUITE, "read", ["buffer", "stream", "string"])
testbuf = IOBuffer(randstring(RandUtils.SEED, 10^4))

g["read"] = @benchmarkable perf_read!($testbuf)
g["readstring"] = @benchmarkable readstring($testbuf)
g["readstring"] = @benchmarkable read($testbuf, String)

#################################
# serialization (#18633, #7893) #
Expand Down
2 changes: 1 addition & 1 deletion src/problem/ProblemBenchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ include("JSONParse.jl")

g = addgroup!(SUITE, "json", ["parse", "closure"])

jstr = readstring(joinpath(PROBLEM_DATA_DIR, "test.json"))
jstr = read(joinpath(PROBLEM_DATA_DIR, "test.json"), String)

g["parse_json"] = @benchmarkable JSONParse.perf_parse_json($(jstr))

Expand Down
2 changes: 1 addition & 1 deletion src/problem/SpellCheck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function train(features)
return model
end

const NWORDS = train(words(readstring(joinpath(PROBLEM_DATA_DIR, "norvig_spellcheck.txt"))))
const NWORDS = train(words(read(joinpath(PROBLEM_DATA_DIR, "norvig_spellcheck.txt"), String)))

function edits(word::AbstractString)
splits = [(word[1:i], word[i+1:end]) for i=0:length(word) ]
Expand Down
2 changes: 1 addition & 1 deletion src/shootout/k_nucleotide.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function perf_k_nucleotide()
break
end
end
data = collect(readstring(input))
data = collect(read(input, String))
# delete the newlines and convert to upper case
i, j = 1, 1
while i <= length(data)
Expand Down
2 changes: 1 addition & 1 deletion src/shootout/regex_dna.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const subs = [

function perf_regex_dna()
infile = joinpath(SHOOTOUT_DATA_PATH, "regexdna-input.txt")
seq = readstring(infile)
seq = read(infile, String)
l1 = length(seq)

seq = replace(seq, r">.*\n|\n", "")
Expand Down

0 comments on commit 5914cdc

Please sign in to comment.