Skip to content

Instantly share code, notes, and snippets.

View gist:2af5bc84d5e61c777d8bf700bc8f9f12
/// Inserts a new user.
pub fn create_user<'a>(conn: &PgConnection, name: &'a str, admin: bool)
-> Result<PgConnection, MyErrorType> {
use self::schema::users;
let new_user = NewUser {
name: name,
karma: 0,
admin: admin,
};
View gist:1b15782acd1641c9165c52b68ce486f5
error[E0277]: the trait bound `diesel::pg::PgConnection: diesel::Queryable<(diesel::types::Integer, diesel::types::Text, diesel::types::Integer, diesel::types::Bool), diesel::pg::Pg>` is not satisfied
--> src/database/mod.rs:38:53
|
38 | Ok(diesel::insert(&new_user).into(users::table).get_result(conn)?)
| ^^^^^^^^^^ the trait `diesel::Queryable<(diesel::types::Integer, diesel::types::Text, diesel::types::Integer, diesel::types::Bool), diesel::pg::Pg>` is not implemented for `diesel::pg::PgConnection`
error: aborting due to previous error
View keybase.md

Keybase proof

I hereby claim:

  • I am zrneely on github.
  • I am zrneely (https://keybase.io/zrneely) on keybase.
  • I have a public key whose fingerprint is 79FE 22EB EFDD B003 F0D4 563D FE70 6B92 EA70 A246

To claim this, I am signing this object:

@zrneely
zrneely / ffield_py3.patch
Created Feb 12, 2016
Patches an existing ffield.py to create a Python 3 version, ffield3.py
View ffield_py3.patch
--- ffield.py 2016-02-12 16:14:40.654378453 -0500
+++ ffield3.py 2016-02-12 16:16:21.017352960 -0500
@@ -23,10 +23,10 @@
testing_doc Describes some tests to make sure the code is working
as well as some of the built in testing routines.
-
+
"""