From a6d02ea92b2a4e1a1c604bb9d291f3a46d7cc12d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 3 Jan 2021 19:32:49 +0100 Subject: Remove unused things Signed-off-by: Matthias Beyer --- src/main.rs | 15 ++------------- 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>, req: HttpRequest) -> impl Responder { +async fn index(_: web::Data>, _: 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>, req: HttpRequest) -> impl Responder { +async fn metrics(mpd_data: web::Data>, _: 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; -- cgit v1.2.3