Skip to content

Commit

Permalink
Change fields to SubString to save an alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrobinson251 committed Sep 11, 2024
1 parent ee74779 commit 713d9b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/testcontext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Base.size(x::FilteredVector) = size(x.vec)
Base.getindex(x::FilteredVector, i) = x.vec[i]

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

struct DirNode
path::String
path::SubString{String}
testset::DefaultTestSet
junit::Union{JUnitTestSuites,Nothing}
children::Vector{Union{FileNode, DirNode}} # sorted lexically by path
Expand Down

0 comments on commit 713d9b9

Please sign in to comment.