mirror of
https://github.com/actix/examples
synced 2025-06-28 18:00:37 +02:00
Use derive feature from serde https://github.com/serde-rs/serde/issues/1441#issuecomment-445481084 (#230)
This commit is contained in:
committed by
Yuki Okushi
parent
5cbaa75e21
commit
9c34ded6fd
@ -8,6 +8,7 @@ use actix_web::{
|
||||
use diesel::prelude::*;
|
||||
use diesel::PgConnection;
|
||||
use futures::future::Future;
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::errors::ServiceError;
|
||||
use crate::models::{Pool, SlimUser, User};
|
||||
|
@ -1,5 +1,6 @@
|
||||
use actix_web::{error::BlockingError, web, HttpResponse};
|
||||
use diesel::{prelude::*, PgConnection};
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::email_service::send_invitation;
|
||||
use crate::errors::ServiceError;
|
||||
|
@ -1,7 +1,5 @@
|
||||
#[macro_use]
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
use actix_identity::{CookieIdentityPolicy, IdentityService};
|
||||
use actix_web::{middleware, web, App, HttpServer};
|
||||
|
@ -1,5 +1,6 @@
|
||||
use super::schema::*;
|
||||
use diesel::{r2d2::ConnectionManager, PgConnection};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// type alias to use in multiple places
|
||||
pub type Pool = r2d2::Pool<ConnectionManager<PgConnection>>;
|
||||
|
@ -1,5 +1,6 @@
|
||||
use actix_web::{error::BlockingError, web, HttpResponse};
|
||||
use diesel::prelude::*;
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::errors::ServiceError;
|
||||
use crate::models::{Invitation, Pool, SlimUser, User};
|
||||
|
Reference in New Issue
Block a user