Skip to content

Commit

Permalink
Reformat with scalafmt 3.8.3
Browse files Browse the repository at this point in the history
Executed command: scalafmt --non-interactive
  • Loading branch information
scala-steward committed Jul 29, 2024
1 parent 6c90b49 commit d6fd43d
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 d6fd43d

Please sign in to comment.