Skip to content

Commit d20e70f

Browse files
chore: remove schemacache error
1 parent 59b8065 commit d20e70f

File tree

4 files changed

+1
-56
lines changed

4 files changed

+1
-56
lines changed

crates/pg_schema_cache/src/diagnostics.rs

Lines changed: 0 additions & 38 deletions
This file was deleted.

crates/pg_schema_cache/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
33
#![allow(dead_code)]
44

5-
mod diagnostics;
65
mod functions;
76
mod schema_cache;
87
mod schemas;
98
mod tables;
109
mod types;
1110
mod versions;
1211

13-
pub use diagnostics::SchemaCacheError;
1412
pub use functions::{Behavior, Function, FunctionArg, FunctionArgs};
1513
pub use schema_cache::SchemaCache;
1614
pub use tables::{ReplicaIdentity, Table};

crates/pg_schema_cache/src/schema_cache.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use sqlx::postgres::PgPool;
22

3-
use crate::diagnostics::SchemaCacheError;
43
use crate::functions::Function;
54
use crate::schemas::Schema;
65
use crate::tables::Table;
@@ -21,7 +20,7 @@ impl SchemaCache {
2120
SchemaCache::default()
2221
}
2322

24-
pub async fn load(pool: &PgPool) -> Result<SchemaCache, SchemaCacheError> {
23+
pub async fn load(pool: &PgPool) -> Result<SchemaCache, sqlx::Error> {
2524
let (schemas, tables, functions, types, versions) = futures_util::try_join!(
2625
Schema::load(pool),
2726
Table::load(pool),

crates/pg_workspace_new/src/diagnostics.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use pg_diagnostics::{
55
category, Advices, Category, Diagnostic, DiagnosticTags, LogCategory, Severity, Visit,
66
};
77
use pg_fs::FileSystemDiagnostic;
8-
use pg_schema_cache::SchemaCacheError;
98
use serde::{Deserialize, Serialize};
109
use std::error::Error;
1110
use std::fmt;
@@ -240,19 +239,6 @@ impl From<sqlx::Error> for WorkspaceError {
240239
}
241240
}
242241

243-
impl From<SchemaCacheError> for WorkspaceError {
244-
fn from(err: SchemaCacheError) -> Self {
245-
match err {
246-
SchemaCacheError::DatabaseConnectionError(db_err) => {
247-
WorkspaceError::DatabaseConnectionError(DatabaseConnectionError {
248-
message: db_err.message,
249-
code: db_err.code,
250-
})
251-
}
252-
}
253-
}
254-
}
255-
256242
#[derive(Debug, Serialize, Deserialize, Diagnostic)]
257243
#[diagnostic(
258244
category = "internalError/fs",

0 commit comments

Comments
 (0)