Skip to content

Commit

Permalink
Remove unneeded conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDiekmann committed Mar 11, 2024
1 parent af538e4 commit ec62d2d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions apps/hash-graph/libs/graph/src/snapshot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ use tokio_postgres::{
tls::{MakeTlsConnect, TlsConnect},
Socket,
};
use type_system::url::{BaseUrl, VersionedUrl};
use type_system::url::VersionedUrl;

use crate::{
snapshot::{
Expand Down Expand Up @@ -400,8 +400,7 @@ where
.map_ok(|row| {
SnapshotEntry::DataTypeEmbedding(DataTypeEmbeddingRecord {
data_type_id: VersionedUrl {
base_url: BaseUrl::new(row.get(0))
.expect("Invalid base URL returned from Postgres"),
base_url: row.get(0),
version: row.get(1),
},
embedding: row.get(2),
Expand Down Expand Up @@ -433,8 +432,7 @@ where
.map_ok(|row| {
SnapshotEntry::PropertyTypeEmbedding(PropertyTypeEmbeddingRecord {
property_type_id: VersionedUrl {
base_url: BaseUrl::new(row.get(0))
.expect("Invalid base URL returned from Postgres"),
base_url: row.get(0),
version: row.get(1),
},
embedding: row.get(2),
Expand Down Expand Up @@ -466,8 +464,7 @@ where
.map_ok(|row| {
SnapshotEntry::EntityTypeEmbedding(EntityTypeEmbeddingRecord {
entity_type_id: VersionedUrl {
base_url: BaseUrl::new(row.get(0))
.expect("Invalid base URL returned from Postgres"),
base_url: row.get(0),
version: row.get(1),
},
embedding: row.get(2),
Expand Down

0 comments on commit ec62d2d

Please sign in to comment.