Skip to content

Commit

Permalink
chore: rename Options variants to OptionsError
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Sep 14, 2023
1 parent 63774bb commit 8414854
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions wrappers/src/fdw/airtable_fdw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ enum AirtableFdwError {
RequestError(#[from] reqwest_middleware::Error),

#[error("{0}")]
Options(#[from] OptionsError),
OptionsError(#[from] OptionsError),
}

impl From<AirtableFdwError> for ErrorReport {
fn from(value: AirtableFdwError) -> Self {
match value {
AirtableFdwError::CreateRuntimeError(e) => e.into(),
AirtableFdwError::Options(e) => e.into(),
AirtableFdwError::OptionsError(e) => e.into(),
_ => ErrorReport::new(PgSqlErrorCode::ERRCODE_FDW_ERROR, format!("{value}"), ""),
}
}
Expand Down
4 changes: 2 additions & 2 deletions wrappers/src/fdw/bigquery_fdw/bigquery_fdw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ enum BigQueryFdwError {
#[error("{0}")]
CreateRuntimeError(#[from] CreateRuntimeError),
#[error("{0}")]
Options(#[from] OptionsError),
OptionsError(#[from] OptionsError),
}

impl From<BigQueryFdwError> for ErrorReport {
fn from(value: BigQueryFdwError) -> Self {
match value {
BigQueryFdwError::CreateRuntimeError(e) => e.into(),
BigQueryFdwError::Options(e) => e.into(),
BigQueryFdwError::OptionsError(e) => e.into(),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions wrappers/src/fdw/clickhouse_fdw/clickhouse_fdw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@ enum ClickHouseFdwError {
#[error("{0}")]
CreateRuntimeError(#[from] CreateRuntimeError),
#[error("{0}")]
Options(#[from] OptionsError),
OptionsError(#[from] OptionsError),
}

impl From<ClickHouseFdwError> for ErrorReport {
fn from(value: ClickHouseFdwError) -> Self {
match value {
ClickHouseFdwError::CreateRuntimeError(e) => e.into(),
ClickHouseFdwError::Options(e) => e.into(),
ClickHouseFdwError::OptionsError(e) => e.into(),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions wrappers/src/fdw/firebase_fdw/firebase_fdw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ enum FirebaseFdwError {
#[error("{0}")]
CreateRuntimeError(#[from] CreateRuntimeError),
#[error("{0}")]
Options(#[from] OptionsError),
OptionsError(#[from] OptionsError),
}

impl From<FirebaseFdwError> for ErrorReport {
fn from(value: FirebaseFdwError) -> Self {
match value {
FirebaseFdwError::CreateRuntimeError(e) => e.into(),
FirebaseFdwError::Options(e) => e.into(),
FirebaseFdwError::OptionsError(e) => e.into(),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions wrappers/src/fdw/logflare_fdw/logflare_fdw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ enum LogflareFdwError {
#[error("{0}")]
CreateRuntimeError(#[from] CreateRuntimeError),
#[error("{0}")]
Options(#[from] OptionsError),
OptionsError(#[from] OptionsError),
}

impl From<LogflareFdwError> for ErrorReport {
fn from(value: LogflareFdwError) -> Self {
match value {
LogflareFdwError::CreateRuntimeError(e) => e.into(),
LogflareFdwError::Options(e) => e.into(),
LogflareFdwError::OptionsError(e) => e.into(),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions wrappers/src/fdw/s3_fdw/s3_fdw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ impl S3Fdw {
#[derive(Error, Debug)]
enum S3FdwError {
#[error("{0}")]
Options(#[from] OptionsError),
OptionsError(#[from] OptionsError),
}

impl From<S3FdwError> for ErrorReport {
fn from(value: S3FdwError) -> Self {
match value {
S3FdwError::Options(e) => e.into(),
S3FdwError::OptionsError(e) => e.into(),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions wrappers/src/fdw/stripe_fdw/stripe_fdw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,14 +632,14 @@ enum StripeFdwError {
#[error("{0}")]
CreateRuntimeError(#[from] CreateRuntimeError),
#[error("{0}")]
Options(#[from] OptionsError),
OptionsError(#[from] OptionsError),
}

impl From<StripeFdwError> for ErrorReport {
fn from(value: StripeFdwError) -> Self {
match value {
StripeFdwError::CreateRuntimeError(e) => e.into(),
StripeFdwError::Options(e) => e.into(),
StripeFdwError::OptionsError(e) => e.into(),
}
}
}
Expand Down

0 comments on commit 8414854

Please sign in to comment.