fix: remove compilation error
parent
a744c02df4
commit
23d384989e
|
@ -1 +0,0 @@
|
||||||
module metrics
|
|
|
@ -7,7 +7,7 @@ import arrays
|
||||||
pub struct PrometheusExporter {
|
pub struct PrometheusExporter {
|
||||||
buckets []f64
|
buckets []f64
|
||||||
mut:
|
mut:
|
||||||
collector MetricsCollector
|
collector &MetricsCollector = unsafe { nil }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_prometheus_exporter(buckets []f64) PrometheusExporter {
|
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) {
|
pub fn (mut e PrometheusExporter) load(collector &MetricsCollector) {
|
||||||
e.collector = collector
|
unsafe {
|
||||||
|
e.collector = collector
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut e PrometheusExporter) export_to_string() !string {
|
pub fn (mut e PrometheusExporter) export_to_string() !string {
|
||||||
|
|
Loading…
Reference in New Issue