fix: remove compilation error

mem-usage
Jef Roosens 2022-12-30 09:55:39 +01:00
parent a744c02df4
commit 23d384989e
2 changed files with 5 additions and 4 deletions

View File

@ -1 +0,0 @@
module metrics

View File

@ -7,7 +7,7 @@ import arrays
pub struct PrometheusExporter {
buckets []f64
mut:
collector MetricsCollector
collector &MetricsCollector = unsafe { nil }
}
pub fn new_prometheus_exporter(buckets []f64) PrometheusExporter {
@ -16,8 +16,10 @@ pub fn new_prometheus_exporter(buckets []f64) PrometheusExporter {
}
}
pub fn (mut e PrometheusExporter) load(collector MetricsCollector) {
e.collector = collector
pub fn (mut e PrometheusExporter) load(collector &MetricsCollector) {
unsafe {
e.collector = collector
}
}
pub fn (mut e PrometheusExporter) export_to_string() !string {