Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mquery
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Subconscious Compute (Open)
mquery
Commits
c7cfe42f
Commit
c7cfe42f
authored
1 year ago
by
Maaz Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
refactor: remove an error variant that is never used
parent
6cbb1230
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
Release: prepare and release v0.4.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/result.rs
+0
-7
0 additions, 7 deletions
src/result.rs
with
0 additions
and
7 deletions
src/result.rs
+
0
−
7
View file @
c7cfe42f
...
...
@@ -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!
(),
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment