Closed Chanchal1233 closed 8 months ago
getting these two errors when compiling:
error[E0277]: the trait bound Uuid: ToSql is not satisfied
Uuid: ToSql
error[E0277]: the trait bound NaiveDateTime: ToSql is not satisfied
NaiveDateTime: ToSql
my dependency setup:
[package] name = "warehousrManagementService" version = "0.1.0" edition = "2021"
[dependencies] actix-web = "4" tokio = { version = "1", features = ["full"] } tokio-postgres = "0.7.2" chrono = { version = "0.4.19", features = ["serde"] } serde = "1.0" serde_derive = "1.0" uuid = { version = "0.8.2", features = ["v4", "serde"] } serde_json = "1.0.64"
New to rust would really appreciate the help. Thanks.
tokio-postgres = { version = "0.7.2", features = ["with-uuid-0_8"] }
Just in case someone runs across this in 2024+:
tokio-postgres = { version = "0.7.10", features = ["with-uuid-1"] }
getting these two errors when compiling:
error[E0277]: the trait bound
Uuid: ToSql
is not satisfiederror[E0277]: the trait bound
NaiveDateTime: ToSql
is not satisfiedmy dependency setup:
[package] name = "warehousrManagementService" version = "0.1.0" edition = "2021"
[dependencies] actix-web = "4" tokio = { version = "1", features = ["full"] } tokio-postgres = "0.7.2" chrono = { version = "0.4.19", features = ["serde"] } serde = "1.0" serde_derive = "1.0" uuid = { version = "0.8.2", features = ["v4", "serde"] } serde_json = "1.0.64"
New to rust would really appreciate the help. Thanks.