Skip to content

Commit

Permalink
update: scalafmt-core 3.8.1 -> 3.8.2 (#217)
Browse files Browse the repository at this point in the history
* update: scalafmt-core 3.8.1 -> 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
  • Loading branch information
zhaihao authored Jun 15, 2024
1 parent f69336d commit afb0ebd
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.8.2
e3c3752c987e5ca293da84b6a08a366033fdebe3
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.1
version = 3.8.2
runner.dialect = scala213
// 最大宽度
maxColumn = 150
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/bloomfilter/mutable/BloomFilter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BloomFilter[T] private (val numberOfBits: Long, val numberOfHashes: Int, p
while (i < numberOfHashes) {
val computedHash = hash1 + i * hash2
bits.set((computedHash & Long.MaxValue) % numberOfBits)
i += 1
i += 1
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class BloomFilter[T] private (val numberOfBits: Long, val numberOfHashes: Int, p
while (i < numberOfHashes) {
val computedHash = hash._1 + i * hash._2
bits.set((computedHash & Long.MaxValue) % numberOfBits)
i += 1
i += 1
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/config/Ini.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ object Ini {

class Ini(private val underlying: MMap[String, MMap[String, String]]) {
def get(key: String, section: String) = underlying(section)(key)
def get(key: String) = underlying(Ini.ROOT)(key)
def get(key: String) = underlying(Ini.ROOT)(key)
}
6 changes: 3 additions & 3 deletions src/main/scala/console/ProcessBar.scala
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ object ProgressBar {
private val UnknownTotal: Int = -1

def apply(total: Int, barFormatter: BarFormatter): ProgressBar = new ProgressBar(total, barFormatter)
def apply(total: Int): ProgressBar = new ProgressBar(total, new BarFormatter())
def apply(barFormatter: BarFormatter): ProgressBar = new ProgressBar(UnknownTotal, barFormatter)
def apply(): ProgressBar = new ProgressBar(UnknownTotal, new BarFormatter())
def apply(total: Int): ProgressBar = new ProgressBar(total, new BarFormatter())
def apply(barFormatter: BarFormatter): ProgressBar = new ProgressBar(UnknownTotal, barFormatter)
def apply(): ProgressBar = new ProgressBar(UnknownTotal, new BarFormatter())
}
28 changes: 14 additions & 14 deletions src/main/scala/hash/Algo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ trait WithAlgo[A] {

protected def withAlgo(algo: Algo): A

def md2 = withAlgo(new Algo(() => new MessageDigest("MD2")))
def md5 = withAlgo(new Algo(() => new MessageDigest("MD5")))
def sha1 = withAlgo(new Algo(() => new MessageDigest("SHA-1")))
def sha224 = withAlgo(new Algo(() => new MessageDigest("SHA-224")))
def sha256 = withAlgo(new Algo(() => new MessageDigest("SHA-256")))
def sha384 = withAlgo(new Algo(() => new MessageDigest("SHA-384")))
def sha512 = withAlgo(new Algo(() => new MessageDigest("SHA-512")))
def crc32 = withAlgo(new Algo(() => new CRC32Digest))
def bcrypt = withAlgo(new Algo(() => new BCryptDigest(10)))
def md2 = withAlgo(new Algo(() => new MessageDigest("MD2")))
def md5 = withAlgo(new Algo(() => new MessageDigest("MD5")))
def sha1 = withAlgo(new Algo(() => new MessageDigest("SHA-1")))
def sha224 = withAlgo(new Algo(() => new MessageDigest("SHA-224")))
def sha256 = withAlgo(new Algo(() => new MessageDigest("SHA-256")))
def sha384 = withAlgo(new Algo(() => new MessageDigest("SHA-384")))
def sha512 = withAlgo(new Algo(() => new MessageDigest("SHA-512")))
def crc32 = withAlgo(new Algo(() => new CRC32Digest))
def bcrypt = withAlgo(new Algo(() => new BCryptDigest(10)))
def bcrypt(rounds: Int = 10) = withAlgo(new Algo(() => new BCryptDigest(rounds)))

class HmacBuilder(val key: Array[Byte]) {
Expand Down Expand Up @@ -61,10 +61,10 @@ class Algo private[hash] (
def tap(value: InputStream, codec: Codec): InputStreamTap =
new InputStreamTap(digest, value)

def tap(value: InputStream): InputStreamTap = tap(value, Codec.UTF8)
def tap(value: Reader, encoding: Codec): ReaderTap = new ReaderTap(digest, value, encoding)
def tap(value: Reader): ReaderTap = tap(value, Codec.UTF8)
def tap(value: Source, encoding: Codec): SourceTap = new SourceTap(digest, value, encoding)
def tap(value: Source): SourceTap = tap(value, Codec.UTF8)
def tap(value: InputStream): InputStreamTap = tap(value, Codec.UTF8)
def tap(value: Reader, encoding: Codec): ReaderTap = new ReaderTap(digest, value, encoding)
def tap(value: Reader): ReaderTap = tap(value, Codec.UTF8)
def tap(value: Source, encoding: Codec): SourceTap = new SourceTap(digest, value, encoding)
def tap(value: Source): SourceTap = tap(value, Codec.UTF8)
def foldAble = new FoldAble(digest)
}

0 comments on commit afb0ebd

Please sign in to comment.