Created
January 15, 2018 23:32
-
-
Save canadaduane/8629bc281336577ca99bb1ccdda4eb55 to your computer and use it in GitHub Desktop.
Can't compile diesel app--what am I missing?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error[E0277]: the trait bound `i64: diesel::deserialize::FromSql<diesel::sql_types::Nullable<diesel::sql_types::BigInt>, _>` is not satisfied | |
--> src/main.rs:32:10 | |
| | |
32 | .load::<db::models::Device>(&connection) | |
| ^^^^ the trait `diesel::deserialize::FromSql<diesel::sql_types::Nullable<diesel::sql_types::BigInt>, _>` is not implemented for `i64` | |
| | |
= help: the following implementations were found: | |
<i64 as diesel::deserialize::FromSql<diesel::sql_types::BigInt, DB>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For future arrivals: I needed to use
Option<i64>
because my field was Nullable. Like this: