Skip to content

Commit d9398d9

Browse files
author
Bent Engbers
committed
Update axum_with_globals.rs
1 parent d2e54cd commit d9398d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/axum_with_globals.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use tokio::time;
1919

2020
static REGISTRY: LazyLock<Mutex<Registry>> = LazyLock::new(|| Mutex::new(Registry::default()));
2121

22-
fn register_metric_to_global_registry<MetricType: Metric + Clone + Default>(
22+
pub fn register_metric_to_global_registry<MetricType: Metric + Clone + Default>(
2323
name: &str,
2424
help: &str,
2525
) -> MetricType {
@@ -31,7 +31,7 @@ fn register_metric_to_global_registry<MetricType: Metric + Clone + Default>(
3131
metric
3232
}
3333

34-
async fn metrics_handler() -> impl IntoResponse {
34+
pub async fn metrics_handler() -> impl IntoResponse {
3535
let mut buffer = String::new();
3636
{
3737
let registry = REGISTRY

0 commit comments

Comments
 (0)