From 68d2afc75de56c99ff6ca8515dcc001508d8cd93 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 22 Dec 2022 15:12:38 +0100 Subject: [PATCH] :sparkles: Add missing type hints on backend code --- backend/src/app/metrics.clj | 2 +- backend/src/app/rpc/commands/binfile.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/app/metrics.clj b/backend/src/app/metrics.clj index aa5979c4a..c11d3d112 100644 --- a/backend/src/app/metrics.clj +++ b/backend/src/app/metrics.clj @@ -132,7 +132,7 @@ (defmethod run-collector! :counter [{:keys [::mdef/instance]} {:keys [inc labels] :or {inc 1 labels default-empty-labels}}] - (let [instance (.labels instance (if (is-array? labels) labels (into-array String labels)))] + (let [instance (.labels ^Counter instance (if (is-array? labels) labels (into-array String labels)))] (.inc ^Counter$Child instance (double inc)))) (defmethod run-collector! :gauge diff --git a/backend/src/app/rpc/commands/binfile.clj b/backend/src/app/rpc/commands/binfile.clj index 87945779f..bd7eb1b61 100644 --- a/backend/src/app/rpc/commands/binfile.clj +++ b/backend/src/app/rpc/commands/binfile.clj @@ -294,7 +294,7 @@ (defn- retrieve-file [pool file-id] - (with-open [conn (db/open pool)] + (with-open [^AutoCloseable conn (db/open pool)] (binding [pmap/*load-fn* (partial files/load-pointer conn file-id)] (some-> (db/get* conn :file {:id file-id}) (files/decode-row)