Skip to content

Commit

Permalink
Renamed LazyList to Stream
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jan 24, 2025
1 parent a6b4b1f commit c0b41b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/probably.Report.scala
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class Report(using Environment):
if surface.juncture.treeName == t"DefDef" then e"${surface.juncture.method.teletype}"
else e"${surface.juncture.shortCode}"

def render(junctures: List[Surface]): LazyList[(Surface, Teletype)] =
def render(junctures: List[Surface]): Stream[(Surface, Teletype)] =
val diagram = TreeDiagram.by[Surface](_.children)(junctures*)
diagram.nodes.zip(diagram.render(describe))

Expand Down
6 changes: 3 additions & 3 deletions src/coverage/probably.Coverage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ object Coverage:

private def spec(dir: Text): IArray[Juncture] =
val file = java.io.File(java.io.File(dir.s), "scoverage.coverage")
val lines = Source.fromFile(file).getLines.to(LazyList).map(Text(_))
val lines = Source.fromFile(file).getLines.to(Stream).map(Text(_))

def recur(lines: LazyList[Text], junctures: List[Juncture] = Nil): List[Juncture] =
def recur(lines: Stream[Text], junctures: List[Juncture] = Nil): List[Juncture] =
lines match
case As[Int](id) #:: path #:: _ #:: _ #:: _ #:: className #:: methodName #::
As[Int](start) #:: As[Int](end) #:: As[Int](lineNo) #:: symbolName #:: treeName #::
Expand All @@ -76,7 +76,7 @@ object Coverage:
private def measurements(file: File): Set[Int] =
val ids = BitSet()
if !file.exists() then Set()
else Source.fromFile(file).getLines.to(LazyList).each: id =>
else Source.fromFile(file).getLines.to(Stream).each: id =>
ids(id.toInt) = true

ids.to(Set)

0 comments on commit c0b41b9

Please sign in to comment.