diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-01-03 19:32:49 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-01-03 19:33:03 +0100 |
commit | a6d02ea92b2a4e1a1c604bb9d291f3a46d7cc12d (patch) | |
tree | 5d6cfedbc6de1fb00b4219bd497a9af0882f25aa | |
parent | c1b4e78328788a026718ec68f1383007918cbe93 (diff) |
Remove unused things
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | src/main.rs | 15 | ||||
-rw-r--r-- | src/metric.rs | 1 |
2 files changed, 2 insertions, 14 deletions
diff --git a/src/main.rs b/src/main.rs index 003e4be..9ba1763 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,11 +1,4 @@ -use std::cell::Cell; -use std::convert::Infallible; -use std::io; -use std::net::SocketAddr; -use std::sync::Arc; use std::sync::Mutex; -use std::sync::atomic::{AtomicUsize, Ordering}; -use std::convert::TryInto; use actix_web::HttpResponse; use actix_web::http::StatusCode; @@ -15,13 +8,9 @@ use actix_web::HttpServer; use actix_web::Responder; use actix_web::middleware; use actix_web::web; -use actix_web::get; -use anyhow::Context; -use anyhow::Error; use actix_web::Result; use async_mpd::MpdClient; use getset::Getters; -use prometheus_exporter_base::prelude::*; use structopt::StructOpt; use itertools::Itertools; @@ -64,13 +53,13 @@ struct Opt { #[derive(Debug, Clone, Default)] struct PrometheusOptions {} -async fn index(mpd_data: web::Data<Mutex<MpdClient>>, req: HttpRequest) -> impl Responder { +async fn index(_: web::Data<Mutex<MpdClient>>, _: HttpRequest) -> impl Responder { HttpResponse::build(StatusCode::OK) .content_type("text/text; charset=utf-8") .body(String::from("Running")) } -async fn metrics(mpd_data: web::Data<Mutex<MpdClient>>, req: HttpRequest) -> impl Responder { +async fn metrics(mpd_data: web::Data<Mutex<MpdClient>>, _: HttpRequest) -> impl Responder { match metrics_handler(mpd_data).await { Ok(text) => { HttpResponse::build(StatusCode::OK) diff --git a/src/metric.rs b/src/metric.rs index 97c649a..5343481 100644 --- a/src/metric.rs +++ b/src/metric.rs @@ -1,6 +1,5 @@ use std::fmt::Debug; use std::fmt::Display; -use std::convert::TryInto; use anyhow::Result; use anyhow::Error; |