Skip to content

Commit

Permalink
Merge pull request #76 from scala-steward/update/scalafmt-core-2.3.2
Browse files Browse the repository at this point in the history
Update scalafmt-core to 2.3.2
  • Loading branch information
mergify[bot] authored Dec 13, 2019
2 parents 76ebadf + 33c74a2 commit 5ac3841
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ rewrite.rules = [ AvoidInfix, ExpandImportSelectors, RedundantParens, SortModifi
rewrite.sortModifiers.order = [ "private", "protected", "final", "sealed", "abstract", "implicit", "override", "lazy" ]
spaces.inImportCurlyBraces = true # more idiomatic to include whitepsace in import x.{ yyy }
trailingCommas = preserve
version = 2.2.2
version = 2.3.2
1 change: 1 addition & 0 deletions src/main/scala/play/doc/FileRepository.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ case class FileHandle(name: String, size: Long, is: InputStream, close: () => Un
* Repository for loading files
*/
trait FileRepository {

/**
* Load a file using the given loader. If the file is found then the
* file will be opened and loader will be called with its content. The
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/play/doc/PageIndex.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.apache.commons.io.IOUtils
* A table of contents node
*/
sealed trait TocTree {

/**
* The page that this node should point to
*/
Expand Down
15 changes: 7 additions & 8 deletions src/main/scala/play/doc/PlayDoc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,13 @@ class PlayDoc(
.map { line =>
if (!line.exists(_ != ' ')) None else Some(line.indexWhere(_ != ' '))
}
.reduce(
(i1, i2) =>
(i1, i2) match {
case (None, None) => None
case (i, None) => i
case (None, i) => i
case (Some(i1), Some(i2)) => Some(math.min(i1, i2))
}
.reduce((i1, i2) =>
(i1, i2) match {
case (None, None) => None
case (i, None) => i
case (None, i) => i
case (Some(i1), Some(i2)) => Some(math.min(i1, i2))
}
)
.getOrElse(0)

Expand Down
1 change: 1 addition & 0 deletions src/main/scala/play/doc/PlayDocTemplates.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package play.doc
* Templates for rendering Play documentation snippets.
*/
trait PlayDocTemplates {

/**
* Render the next link.
*
Expand Down

0 comments on commit 5ac3841

Please sign in to comment.