mirror of
https://github.com/actix/examples
synced 2024-11-27 16:02:57 +01:00
Merge pull request #231 from rofrol/remove-serde_derive
Remove serde_derive
This commit is contained in:
commit
5493df64e1
@ -17,6 +17,5 @@ num_cpus = "1.10.0"
|
||||
r2d2 = "0.8.2"
|
||||
r2d2_sqlite = "0.8.0"
|
||||
rusqlite = "0.16"
|
||||
serde = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_derive = "1.0"
|
||||
|
@ -38,3 +38,10 @@ sqlite> .tables
|
||||
sqlite> select * from nyc_weather;
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
On Ubuntu 19.10:
|
||||
|
||||
```
|
||||
sudo apt install libsqlite3-dev
|
||||
```
|
||||
|
@ -4,7 +4,7 @@ use futures::{Future, TryFutureExt};
|
||||
use r2d2;
|
||||
use r2d2_sqlite;
|
||||
use rusqlite::NO_PARAMS;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{thread::sleep, time::Duration};
|
||||
|
||||
pub type Pool = r2d2::Pool<r2d2_sqlite::SqliteConnectionManager>;
|
||||
|
@ -10,8 +10,7 @@ actix-rt = "1.0.0"
|
||||
actix-web = { version="2.0.0", features=["openssl"] }
|
||||
|
||||
futures = "0.3.1"
|
||||
serde = "1.0.43"
|
||||
serde_derive = "1.0.43"
|
||||
serde = { version = "1.0.43", features = ["derive"] }
|
||||
serde_json = "1.0.16"
|
||||
validator = "0.6.3"
|
||||
validator_derive = "0.6.5"
|
||||
|
@ -14,8 +14,7 @@
|
||||
|
||||
#[macro_use]
|
||||
extern crate validator_derive;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::io;
|
||||
|
@ -13,9 +13,8 @@ bytes = "0.4"
|
||||
env_logger = "0.6"
|
||||
futures = "0.3.1"
|
||||
uuid = { version = "0.5", features = ["serde", "v4"] }
|
||||
serde = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_derive = "1.0"
|
||||
|
||||
diesel = { version = "^1.1.0", features = ["sqlite", "r2d2"] }
|
||||
r2d2 = "0.8"
|
||||
|
@ -6,8 +6,7 @@
|
||||
//! of them can run in parallel and process messages from same queue.
|
||||
#[macro_use]
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use actix_web::{error, middleware, web, App, Error, HttpResponse, HttpServer};
|
||||
use diesel::prelude::*;
|
||||
|
@ -1,4 +1,5 @@
|
||||
use super::schema::users;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize, Queryable)]
|
||||
pub struct User {
|
||||
|
@ -8,5 +8,4 @@ workspace = ".."
|
||||
[dependencies]
|
||||
actix-web = "2.0.0"
|
||||
actix-rt = "1.0.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use actix_web::{
|
||||
middleware, web, App, HttpRequest, HttpResponse, HttpServer, Responder, Result,
|
||||
|
@ -14,7 +14,6 @@ bytes = "0.5.2"
|
||||
futures = "0.3.1"
|
||||
env_logger = "*"
|
||||
|
||||
serde = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_derive = "1.0"
|
||||
json = "*"
|
||||
|
@ -4,7 +4,7 @@ use actix_web::{
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use futures::StreamExt;
|
||||
use json::JsonValue;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
struct MyObj {
|
||||
|
@ -12,6 +12,5 @@ bytes = "0.5"
|
||||
env_logger = "0.6"
|
||||
futures = "0.3.1"
|
||||
log = "0.4"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
@ -3,7 +3,7 @@
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
pub static JSONRPC_VERSION: &str = "2.0";
|
||||
|
@ -11,6 +11,5 @@ actix-web = "2.0.0"
|
||||
actix-redis = "0.8.0"
|
||||
futures = "0.3.1"
|
||||
redis-async = "0.6.1"
|
||||
serde = "1.0.71"
|
||||
serde_derive = "1.0.71"
|
||||
serde = { version = "1.0.71", features = ["derive"] }
|
||||
env_logger = "0.6"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#[macro_use]
|
||||
extern crate redis_async;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde::Deserialize;
|
||||
|
||||
use actix::prelude::*;
|
||||
use actix_redis::{Command, RedisActor};
|
||||
|
@ -13,8 +13,7 @@ dotenv = "0.13.0"
|
||||
env_logger = "0.5.10"
|
||||
futures = "0.3.1"
|
||||
log = "0.4.3"
|
||||
serde = "1.0.69"
|
||||
serde_derive = "1.0.69"
|
||||
serde = { version = "1.0.69", features = ["derive"] }
|
||||
serde_json = "1.0.22"
|
||||
tera = "1.0"
|
||||
|
||||
|
@ -2,6 +2,7 @@ use actix_files::NamedFile;
|
||||
use actix_session::Session;
|
||||
use actix_web::middleware::errhandlers::ErrorHandlerResponse;
|
||||
use actix_web::{dev, error, http, web, Error, HttpResponse, Result};
|
||||
use serde::Deserialize;
|
||||
use tera::{Context, Tera};
|
||||
|
||||
use crate::db;
|
||||
|
@ -2,8 +2,6 @@
|
||||
extern crate diesel;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
use std::{env, io};
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
use diesel;
|
||||
use diesel::pg::PgConnection;
|
||||
use diesel::prelude::*;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::schema::{
|
||||
tasks,
|
||||
|
@ -1,5 +1,6 @@
|
||||
use actix_session::Session;
|
||||
use actix_web::error::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
const FLASH_KEY: &str = "flash";
|
||||
|
||||
|
@ -8,8 +8,7 @@ edition = "2018"
|
||||
actix-rt = "1.0.0"
|
||||
actix-web = "2.0.0"
|
||||
actix-cors = "0.2.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
dotenv = "0.10"
|
||||
env_logger = "0.6"
|
||||
|
@ -1,6 +1,3 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
use actix_cors::Cors;
|
||||
use actix_web::{http::header, middleware::Logger, web, App, HttpServer};
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
use actix_web::web;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
pub struct Info {
|
||||
|
@ -25,8 +25,7 @@ bytes = "0.5.3"
|
||||
byteorder = "1.2"
|
||||
futures = "0.3"
|
||||
env_logger = "0.6"
|
||||
serde = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_derive = "1.0"
|
||||
tokio = "0.2.4"
|
||||
tokio-util = "0.2.0"
|
||||
tokio-util = "0.2.0"
|
||||
|
@ -1,6 +1,3 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
use actix::prelude::*;
|
||||
use std::str::FromStr;
|
||||
use std::time::Duration;
|
||||
|
@ -5,6 +5,7 @@ use actix::prelude::*;
|
||||
use actix_codec::{Decoder, Encoder};
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
use bytes::{BufMut, BytesMut};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json as json;
|
||||
|
||||
/// Client request
|
||||
|
@ -1,5 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user