Skip to content

Commit cf0e815

Browse files
authored
fix!: remove unused error enums (#868)
Thanks Claude!
1 parent bdd95be commit cf0e815

File tree

7 files changed

+5
-27
lines changed

7 files changed

+5
-27
lines changed

crates/core/src/error.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ pub enum Error {
99
#[error(transparent)]
1010
ChronoParse(#[from] chrono::ParseError),
1111

12-
/// A required feature is not enabled.
13-
#[error("{0} is not enabled")]
14-
FeatureNotEnabled(&'static str),
15-
1612
/// [geojson::Error]
1713
#[error(transparent)]
1814
Geojson(#[from] Box<geojson::Error>),
@@ -94,11 +90,6 @@ pub enum Error {
9490
#[error("Arrow schema mismatch")]
9591
ArrowSchemaMismatch,
9692

97-
/// The arrow table is empty
98-
#[cfg(feature = "geoarrow")]
99-
#[error("Empty arrow table")]
100-
EmptyArrowTable,
101-
10293
/// [geoarrow_schema::error::GeoArrowError]
10394
#[error(transparent)]
10495
#[cfg(feature = "geoarrow")]

crates/io/src/error.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@ use thiserror::Error;
44
#[derive(Error, Debug)]
55
#[non_exhaustive]
66
pub enum Error {
7-
/// An error occurred when getting an href.
8-
#[error("error when getting href={href}: {message}")]
9-
Get {
10-
/// The href that we were trying to get.
11-
href: String,
12-
13-
/// The underling error message.
14-
message: String,
15-
},
16-
17-
/// A required feature is not enabled.
18-
#[error("{0} is not enabled")]
19-
FeatureNotEnabled(&'static str),
20-
217
/// Returned when unable to read a STAC value from a path.
228
#[error("{io}: {path}")]
239
FromPath {

crates/pgstac/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ use tokio_postgres::{GenericClient, Row, types::ToSql};
8484

8585
/// Crate-specific error enum.
8686
#[derive(Debug, thiserror::Error)]
87+
#[non_exhaustive]
8788
pub enum Error {
8889
/// [serde_json::Error]
8990
#[error(transparent)]

crates/server/src/error.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use thiserror::Error;
22

33
/// A crate-specific error type.
44
#[derive(Debug, Error)]
5+
#[non_exhaustive]
56
pub enum Error {
67
/// [bb8::RunError]
78
#[cfg(feature = "pgstac")]
@@ -13,10 +14,6 @@ pub enum Error {
1314
#[error(transparent)]
1415
Bb8DuckdbRun(#[from] Box<bb8::RunError<Error>>),
1516

16-
/// A generic backend error.
17-
#[error("backend error: {0}")]
18-
Backend(String),
19-
2017
/// [stac_duckdb::Error]
2118
#[cfg(feature = "duckdb")]
2219
#[error(transparent)]

crates/server/src/routes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use tower_http::{cors::CorsLayer, trace::TraceLayer};
2020

2121
/// Errors for our axum routes.
2222
#[derive(Debug)]
23+
#[non_exhaustive]
2324
pub enum Error {
2425
/// An server error.
2526
Server(crate::Error),

crates/validate/src/error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use thiserror::Error;
22

33
#[derive(Error, Debug)]
4+
#[non_exhaustive]
45
pub enum Error {
56
/// [fluent_uri::ParseError]
67
#[error(transparent)]

crates/wasm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use thiserror::Error;
99
use wasm_bindgen::prelude::*;
1010

1111
#[derive(Debug, Error)]
12+
#[non_exhaustive]
1213
pub enum Error {
1314
#[error(transparent)]
1415
Arrow(#[from] ArrowError),

0 commit comments

Comments
 (0)