From f1445563270c7ae5f2e83aa86bf74f5cbe21187c Mon Sep 17 00:00:00 2001 From: Aphyr Date: Tue, 3 Oct 2023 19:27:21 -0500 Subject: [PATCH] Type hints --- jepsen/src/jepsen/store/fressian.clj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jepsen/src/jepsen/store/fressian.clj b/jepsen/src/jepsen/store/fressian.clj index e893aac33..a1aec8872 100644 --- a/jepsen/src/jepsen/store/fressian.clj +++ b/jepsen/src/jepsen/store/fressian.clj @@ -12,7 +12,8 @@ [jepsen [history] [util :as util]] [slingshot.slingshot :refer [try+ throw+]]) - (:import (java.io ByteArrayOutputStream) + (:import (java.io ByteArrayOutputStream + Closeable) (java.time Instant) (java.util AbstractList Collections @@ -220,7 +221,7 @@ ([writer-opts _ path x] (if-let [e (with-open [; Make a writer bos (ByteArrayOutputStream.) - w (writer bos writer-opts)] + w ^Closeable (writer bos writer-opts)] ; Try writing x (try (fress/write-object w x) nil