Skip to content

Commit

Permalink
fix tokenlist
Browse files Browse the repository at this point in the history
  • Loading branch information
rvacaru committed Jul 22, 2022
1 parent f40ee72 commit ab2f83d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scalafix-core/src/main/scala-3/scalafix/util/Compat.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scalafix.util

object Compat {
type View[T] = collection.SeqView[T]
type View[T] = collection.View[T]
type SeqView[T] = collection.SeqView[T]

}
4 changes: 2 additions & 2 deletions scalafix-core/src/main/scala/scalafix/util/TokenList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ final class TokenList private (tokens: Tokens) {
}

def leadingSpaces(token: Token): View[Token] =
leading(token).takeWhile(_.is[Token.Space]).asInstanceOf[View[Token]]
leading(token).takeWhile(_.is[Token.Space])

def trailingSpaces(token: Token): View[Token] =
trailing(token).takeWhile(_.is[Token.Space]).asInstanceOf[View[Token]]
trailing(token).takeWhile(_.is[Token.Space])
}

object TokenList {
Expand Down

0 comments on commit ab2f83d

Please sign in to comment.