Skip to content

Commit

Permalink
Update tide example to use dynamic dispatching registry (fails)
Browse files Browse the repository at this point in the history
  • Loading branch information
sd2k committed Mar 25, 2022
1 parent a458c03 commit 855f4ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/tide.rs
Expand Up @@ -11,12 +11,12 @@ use tide::{Middleware, Next, Request, Result};
async fn main() -> std::result::Result<(), std::io::Error> {
tide::log::start();

let mut registry = Registry::default();
let mut registry = <Registry>::default();
let http_requests_total = Family::<Labels, Counter>::default();
registry.register(
"http_requests_total",
"Number of HTTP requests",
http_requests_total.clone(),
Box::new(http_requests_total.clone()),
);

let middleware = MetricsMiddleware {
Expand Down Expand Up @@ -57,7 +57,7 @@ enum Method {

#[derive(Clone)]
struct State {
registry: Arc<Registry<Family<Labels, Counter>>>,
registry: Arc<Registry>,
}

#[derive(Default)]
Expand Down

0 comments on commit 855f4ab

Please sign in to comment.