Skip to content

Commit 8881023

Browse files
fix a new clippy lint (#1211)
* fix a new clippy lint * Update crates/ott-balancer/src/service.rs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 60f5165 commit 8881023

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crates/ott-balancer/src/service.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,14 @@ fn gather_metrics() -> anyhow::Result<Bytes> {
296296
Ok(Bytes::from(buffer))
297297
}
298298

299+
static GAUGE_CLIENTS: Lazy<IntGauge> = Lazy::new(|| {
300+
register_int_gauge!("balancer_clients", "Number of connected websocket clients").unwrap()
301+
});
302+
303+
static COUNTER_HTTP_REQUESTS: Lazy<IntGauge> = Lazy::new(|| {
304+
register_int_gauge!("balancer_http_requests", "Number of HTTP requests received").unwrap()
305+
});
306+
299307
#[cfg(test)]
300308
mod test {
301309
use super::*;
@@ -350,11 +358,3 @@ mod test {
350358
}
351359
}
352360
}
353-
354-
static GUAGE_CLIENTS: Lazy<IntGauge> = Lazy::new(|| {
355-
register_int_gauge!("balancer_clients", "Number of connected websocket clients").unwrap()
356-
});
357-
358-
static COUNTER_HTTP_REQUESTS: Lazy<IntGauge> = Lazy::new(|| {
359-
register_int_gauge!("balancer_http_requests", "Number of HTTP requests received").unwrap()
360-
});

0 commit comments

Comments
 (0)