From c7cfe42ffb0b33aedfb753d4640419fc9ddc5315 Mon Sep 17 00:00:00 2001
From: Maaz Ahmed <maaz.a@subcom.tech>
Date: Tue, 26 Dec 2023 14:44:17 +0530
Subject: [PATCH] refactor: remove an error variant that is never used

---
 src/result.rs | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/result.rs b/src/result.rs
index 949d5ad..68d1b1c 100644
--- a/src/result.rs
+++ b/src/result.rs
@@ -66,10 +66,6 @@ pub enum Error {
     /// Occurs when Prometheus responds with e.g. HTTP 4xx (e.g. due to a syntax error in a PromQL query).<br>
     /// Details on the error as reported by Prometheus are included in [`PrometheusError`].
     Prometheus(PrometheusError),
-    /// Occurs when the [`Client::series`](crate::Client::series) method is called with an empty set of
-    /// series [`Selector`](crate::selector::Selector)s. According to the Prometheus API description at least one
-    /// [`Selector`](crate::selector::Selector) must be provided.
-    EmptySeriesSelector,
 }
 
 impl Display for Error {
@@ -77,7 +73,6 @@ impl Display for Error {
         match self {
             Self::Client(e) => e.fmt(f),
             Self::Prometheus(e) => e.fmt(f),
-            Self::EmptySeriesSelector => f.write_str("at least one series selector must be provided in order to query the series endpoint"),
         }
     }
 }
@@ -87,7 +82,6 @@ impl std::error::Error for Error {
         match self {
             Self::Client(e) => e.source(),
             Self::Prometheus(p) => p.source(),
-            Self::EmptySeriesSelector => None,
         }
     }
 }
@@ -97,7 +91,6 @@ impl From<prometheus_http_query::Error> for Error {
         match value {
             prometheus_http_query::Error::Client(c) => Self::Client(c.into()),
             prometheus_http_query::Error::Prometheus(p) => Self::Prometheus(p.into()),
-            prometheus_http_query::Error::EmptySeriesSelector => Self::EmptySeriesSelector,
             _ => unreachable!(),
         }
     }
-- 
GitLab