pub fn find_user_by_username(un: &str, conn: &PgConnection) -> Option<User> {
        let possible_user = users.filter(username.eq(un)).get_result::<User>(conn);
        if let Ok(user) = possible_user {
            Some(user)
        } else {
            None
        }
    }
/// Tries to find the user with the given unique username in the users table.
Tries to find the user with the given unique username in the users table.
Tries to find the user with the given unique username in the users table .
pub fn find_user_by_username(un: &str, conn: &PgConnection) -> Option<User> {
        let possible_user = users.filter(username.eq(un)).get_result::<User>(conn);
        if let Ok(user) = possible_user {
            Some(user)
        } else {
            None
        }
    }
pub fn find_user_by_username ( un : & str , conn : & PgConnection ) -> Option < User > { let possible_user = users . filter ( username . eq ( un ) ) . get_result :: < User > ( conn ) ; if let Ok ( user ) = possible_user { Some ( user ) } else { None } }
Tries to find the user with the given unique username in the users table.
Tries to find the user with the given unique username in the users table .
un
&str
conn
&PgConnection
un
&str
conn
&PgConnection