Skip to content

Commit

Permalink
Reformat with scalafmt 3.8.2
Browse files Browse the repository at this point in the history
Executed command: scalafmt --non-interactive
  • Loading branch information
scala-steward committed Jun 16, 2024
1 parent 5fceaca commit 0fa672c
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ class JavaSerializationAnyRefCodec[S <: Serializable](classTag: ClassTag[S]) ext

def using[T <: Closeable, R](obj: T)(f: T => R): R =
try f(obj)
finally try obj.close()
catch {
case NonFatal(_) => // does nothing
}
finally
try obj.close()
catch {
case NonFatal(_) => // does nothing
}

def encode(value: S): Array[Byte] =
using(new ByteArrayOutputStream()) { buf =>
Expand Down

0 comments on commit 0fa672c

Please sign in to comment.