Changeset

12534:3caff1f93520

util.openmetrics: Set (previously unused, empty) metatable Silences luacheck warning about the metatable being unused.
author Kim Alvefur <zash@zash.se>
date Mon, 30 May 2022 17:34:58 +0200
parents 12533:875f73ead4e8
children 12535:7ef7abb72cdd
files util/openmetrics.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/util/openmetrics.lua	Mon May 30 17:12:58 2022 +0200
+++ b/util/openmetrics.lua	Mon May 30 17:34:58 2022 +0200
@@ -38,7 +38,7 @@
 metric_proxy_mt.__index = metric_proxy_mt
 
 local function new_metric_proxy(metric_family, with_labels_proxy_fun)
-	return {
+	return setmetatable({
 		_family = metric_family,
 		with_labels = function(self, ...)
 			return with_labels_proxy_fun(self._family, ...)
@@ -48,7 +48,7 @@
 				return family:with_labels(label, ...)
 			end)
 		end
-	}
+	}, metric_proxy_mt);
 end
 
 -- END of Utility: "metric proxy"