Skip to content

Commit

Permalink
Merge pull request #27 from aumetra/main
Browse files Browse the repository at this point in the history
Remove dependency on `pq-sys`
  • Loading branch information
kivikakk authored Jun 10, 2023
2 parents 27a2fd1 + cc50030 commit 7c038e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ repository = "https://github.com/kivikakk/diesel_ltree"

[dependencies]
byteorder = "1.0"
diesel = { version = "2.0", default-features = false, features = ["postgres"] }
diesel = { version = "2.0", default-features = false, features = [
"postgres_backend",
] }

[dev-dependencies]
dotenv = "0.15"
diesel = { version = "2.0", default-features = false, features = ["postgres"] }
diesel_migrations = "2.0"
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ pub mod values {
DB: diesel::backend::Backend,
DB: diesel::sql_types::HasSqlType<crate::sql_types::Ltree>,
{
fn from_sql(bytes: diesel::backend::RawValue<'_, DB>) -> deserialize::Result<Self> {
fn from_sql(
bytes: <DB as diesel::backend::Backend>::RawValue<'_>,
) -> deserialize::Result<Self> {
String::from_sql(bytes).map(Ltree)
}
}
Expand Down

0 comments on commit 7c038e9

Please sign in to comment.