diff --git a/src/result.rs b/src/result.rs index 949d5ad80b4413991409e39c6e3157dbb064d6bd..68d1b1c30e2d668adb4ebdb7b0006d03081296ab 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!(), } }