use derive feature over serde_derive crate

This commit is contained in:
Andy Russell 2019-05-09 13:22:44 -04:00
parent a2264cb549
commit ee6f686cc9
No known key found for this signature in database
GPG Key ID: BE2221033EDBC374
7 changed files with 10 additions and 10 deletions

4
Cargo.lock generated
View File

@ -798,7 +798,6 @@ dependencies = [
"rustc-ap-syntax_pos 407.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-workspace-hack 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -853,6 +852,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "serde"
version = "1.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_derive"

View File

@ -37,8 +37,7 @@ generic-simd = ["bytecount/generic-simd"]
atty = "0.2"
itertools = "0.8"
toml = "0.5"
serde = "1.0"
serde_derive = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
unicode-segmentation = "1.0.0"
regex = "1.0"

View File

@ -72,6 +72,8 @@ macro_rules! create_config {
use std::collections::HashSet;
use std::io::Write;
use serde::{Deserialize, Serialize};
#[derive(Clone)]
pub struct Config {
// if a license_template_path has been specified, successfully read, parsed and compiled

View File

@ -5,8 +5,7 @@ use std::path::PathBuf;
use std::rc::Rc;
use std::{cmp, fmt, iter, str};
use serde::de::{Deserialize, Deserializer};
use serde::ser::{self, Serialize, Serializer};
use serde::{ser, Deserialize, Deserializer, Serialize, Serializer};
use serde_json as json;
use syntax::source_map::{self, SourceFile};

View File

@ -4,7 +4,8 @@ use std::path::{Path, PathBuf};
use atty;
use config_proc_macro::config_type;
use serde::de::{Deserialize, Deserializer, SeqAccess, Visitor};
use serde::de::{SeqAccess, Visitor};
use serde::{Deserialize, Deserializer, Serialize};
use crate::config::lists::*;
use crate::config::Config;

View File

@ -11,8 +11,7 @@ use getopts;
#[macro_use]
extern crate log;
use regex;
#[macro_use]
extern crate serde_derive;
use serde::{Deserialize, Serialize};
use serde_json as json;
use std::collections::HashSet;

View File

@ -7,8 +7,6 @@ extern crate derive_new;
extern crate lazy_static;
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
use std::cell::RefCell;
use std::collections::HashMap;