Skip to content

Commit

Permalink
Update scalafmt-core to 3.8.2 (#354)
Browse files Browse the repository at this point in the history
* Update scalafmt-core to 3.8.2

* Reformat with scalafmt 3.8.2

Executed command: scalafmt --non-interactive

* Add 'Reformat with scalafmt 3.8.2' to .git-blame-ignore-revs

---------

Co-authored-by: scala-steward <scala-steward>
  • Loading branch information
softwaremill-ci authored Jul 2, 2024
1 parent aafb743 commit 578f782
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ cc4f48597d3151542ecec3c159159e1793926314

# Scala Steward: Reformat with scalafmt 3.8.1
084144fd6e2c78ee7e3763eace52e9185007175c

# Scala Steward: Reformat with scalafmt 3.8.2
60f546bd54981b54826a07f290b287cd105d6a9a
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
runner.dialect = scala3
version = 3.8.1
version = 3.8.2
maxColumn = 120
15 changes: 7 additions & 8 deletions core/src/main/scala/sttp/model/internal/Rfc3986.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ object Rfc3986 {
): String =
encode(s, "UTF-8", allowedCharacters, spaceAsPlus, encodePlus)


/** Encode string using encoding, leave allowedCharacters as they are
* @param s
* String to be encoded
* @param enc
* Encoding to be used
* @param allowedCharacters
* Characters to be not to be encoded
*/
* @param s
* String to be encoded
* @param enc
* Encoding to be used
* @param allowedCharacters
* Characters to be not to be encoded
*/
def encode(s: String, enc: String, allowedCharacters: Set[Char]): String =
encode(s, enc, allowedCharacters, spaceAsPlus = false, encodePlus = false)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import scala.scalanative.unsafe.{CString, Ptr, Zone, fromCString, sizeof, toCStr

private[model] object IdnApi {
def toAscii(input: String): String =
Zone {
Zone {
val output: Ptr[CString] = malloc(sizeof[CString]).asInstanceOf[Ptr[CString]]
val rc = CIdn.toAscii(toCString(input), output, 0)
if (rc != 0) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/scala/sttp/model/UriTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class UriTests extends AnyFunSuite with Matchers with TryValues with UriTestsExt
"v1-v2" -> "v1-v2",
"v1~v2" -> "v1~v2",
"v1_v2" -> "v1_v2",
"v1.v2" -> "v1.v2",
"v1.v2" -> "v1.v2"
)

for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
import sttp.model.Uri._

trait UriTestsExtension
trait UriTestsExtension

0 comments on commit 578f782

Please sign in to comment.