1
0
Fork 0

Fix code style

This commit is contained in:
Alex Kotov 2020-10-15 06:57:53 +05:00
parent 6d490b9883
commit 5db858bb19
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -20,14 +20,14 @@ pub struct NewUser<'a> {
}
impl User {
pub fn all(db_conn: DbConn) -> Result<Vec<User>, ()> {
pub fn all(db_conn: DbConn) -> Result<Vec<Self>, ()> {
let query = users::table.as_query();
let debug = diesel::debug_query::<diesel::pg::Pg, _>(&query);
println!("{}", debug);
let result = query.load::<User>(&*db_conn);
let result = query.load::<Self>(&*db_conn);
match result {
Err(_) => Err(()),