Skip to content

Commit a011687

Browse files
Change fields to SubString to save an alloc
1 parent 72a0162 commit a011687

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
@@ -33,7 +33,7 @@ mutable struct TestContext
3333
end
3434

3535
struct FileNode
36-
path::String
36+
path::SubString{String}
3737
testset::DefaultTestSet
3838
junit::Union{JUnitTestSuite,Nothing}
3939
testitems::Vector{TestItem} # sorted by line number within file
@@ -49,7 +49,7 @@ Base.push!(f::FileNode, ti::TestItem) = push!(f.testitems, ti)
4949
walk(f, fn::FileNode) = foreach(f, fn.testitems)
5050

5151
struct DirNode
52-
path::String
52+
path::SubString{String}
5353
testset::DefaultTestSet
5454
junit::Union{JUnitTestSuites,Nothing}
5555
children::Vector{Union{FileNode, DirNode}} # sorted lexically by path

0 commit comments

Comments
 (0)