Skip to content

Commit 713d9b9

Browse files
Change fields to SubString to save an alloc
1 parent ee74779 commit 713d9b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/testcontext.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Base.size(x::FilteredVector) = size(x.vec)
4646
Base.getindex(x::FilteredVector, i) = x.vec[i]
4747

4848
struct FileNode
49-
path::String
49+
path::SubString{String}
5050
testset::DefaultTestSet
5151
junit::Union{JUnitTestSuite,Nothing}
5252
testitems::FilteredVector{TestItem} # sorted by line number within file
@@ -62,7 +62,7 @@ Base.push!(f::FileNode, ti::TestItem) = push!(f.testitems, ti)
6262
walk(f, fn::FileNode) = foreach(f, fn.testitems)
6363

6464
struct DirNode
65-
path::String
65+
path::SubString{String}
6666
testset::DefaultTestSet
6767
junit::Union{JUnitTestSuites,Nothing}
6868
children::Vector{Union{FileNode, DirNode}} # sorted lexically by path

0 commit comments

Comments
 (0)