Rocket

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 4ef179cc59dde4cadd37b7977cb5fe1f4a4e4ad6
parent 7090e2a1eeb31d5a1536a489698a60fd2547323d
Author: Sergio Benitez <sb@sergio.bz>
Date:   Sun, 28 Oct 2018 21:09:04 -0700

Migrate from 'derive_utils' to published 'devise'.

Resolves #800.

Diffstat:
Mcontrib/codegen/Cargo.toml | 5+----
Mcontrib/codegen/src/database.rs | 2+-
Mcontrib/codegen/src/lib.rs | 4++--
Mcore/codegen/Cargo.toml | 5+----
Mcore/codegen/src/attribute/catch.rs | 2+-
Mcore/codegen/src/attribute/route.rs | 2+-
Mcore/codegen/src/attribute/segments.rs | 2+-
Mcore/codegen/src/bang/mod.rs | 2+-
Mcore/codegen/src/bang/uri.rs | 4++--
Mcore/codegen/src/bang/uri_parsing.rs | 6+++---
Mcore/codegen/src/derive/from_form.rs | 2+-
Mcore/codegen/src/derive/from_form_value.rs | 2+-
Mcore/codegen/src/derive/responder.rs | 4++--
Mcore/codegen/src/derive/uri_display.rs | 2+-
Mcore/codegen/src/http_codegen.rs | 2+-
Mcore/codegen/src/lib.rs | 4++--
Mcore/codegen/src/syn_ext.rs | 2+-
17 files changed, 23 insertions(+), 29 deletions(-)

diff --git a/contrib/codegen/Cargo.toml b/contrib/codegen/Cargo.toml @@ -19,9 +19,6 @@ database_attribute = [] [lib] proc-macro = true -[dependencies.derive_utils] -git = "https://github.com/SergioBenitez/derive-utils" -rev = "62f361f" - [dependencies] +devise = "0.1" quote = "0.6" diff --git a/contrib/codegen/src/database.rs b/contrib/codegen/src/database.rs @@ -1,5 +1,5 @@ use proc_macro::TokenStream; -use derive_utils::{Spanned, Result}; +use devise::{Spanned, Result}; use syn::{DataStruct, Fields, Data, Type, LitStr, DeriveInput, Ident, Visibility}; #[derive(Debug)] diff --git a/contrib/codegen/src/lib.rs b/contrib/codegen/src/lib.rs @@ -24,14 +24,14 @@ //! DATABASE_NAME := (string literal) //! </pre> -extern crate derive_utils; +extern crate devise; extern crate proc_macro; #[allow(unused_imports)] #[macro_use] extern crate quote; #[allow(unused_imports)] -crate use derive_utils::{syn, proc_macro2}; +crate use devise::{syn, proc_macro2}; #[cfg(feature = "database_attribute")] mod database; diff --git a/core/codegen/Cargo.toml b/core/codegen/Cargo.toml @@ -21,15 +21,12 @@ proc-macro = true indexmap = "1.0" quote = "0.6.1" rocket_http = { version = "0.4.0-dev", path = "../http/" } +devise = "0.1" [build-dependencies] yansi = "0.4" version_check = "0.1.3" -[dependencies.derive_utils] -git = "https://github.com/SergioBenitez/derive-utils" -rev = "62f361f" - [dev-dependencies] rocket = { version = "0.4.0-dev", path = "../lib" } compiletest_rs = { git = "https://github.com/laumann/compiletest-rs" } diff --git a/core/codegen/src/attribute/catch.rs b/core/codegen/src/attribute/catch.rs @@ -1,5 +1,5 @@ use proc_macro::{TokenStream, Span}; -use derive_utils::{syn, Spanned, Result, FromMeta}; +use devise::{syn, Spanned, Result, FromMeta}; use proc_macro2::TokenStream as TokenStream2; use http_codegen::Status; diff --git a/core/codegen/src/attribute/route.rs b/core/codegen/src/attribute/route.rs @@ -1,6 +1,6 @@ use proc_macro::{TokenStream, Span}; use proc_macro2::TokenStream as TokenStream2; -use derive_utils::{syn, Spanned, SpanWrapped, Result, FromMeta, ext::TypeExt}; +use devise::{syn, Spanned, SpanWrapped, Result, FromMeta, ext::TypeExt}; use indexmap::IndexSet; use proc_macro_ext::{Diagnostics, SpanExt}; diff --git a/core/codegen/src/attribute/segments.rs b/core/codegen/src/attribute/segments.rs @@ -1,6 +1,6 @@ use std::hash::{Hash, Hasher}; -use derive_utils::syn; +use devise::syn; use proc_macro::{Span, Diagnostic}; use http::route::RouteSegment; diff --git a/core/codegen/src/bang/mod.rs b/core/codegen/src/bang/mod.rs @@ -1,7 +1,7 @@ use proc_macro::TokenStream; use proc_macro2::TokenStream as TokenStream2; -use derive_utils::{syn, Spanned, Result}; +use devise::{syn, Spanned, Result}; use self::syn::{Path, punctuated::Punctuated, parse::Parser, token::Comma}; use syn_ext::{IdentExt, syn_to_diag}; use {ROUTE_STRUCT_PREFIX, CATCH_STRUCT_PREFIX}; diff --git a/core/codegen/src/bang/uri.rs b/core/codegen/src/bang/uri.rs @@ -2,8 +2,8 @@ use std::fmt::Display; use proc_macro::TokenStream; use proc_macro2::TokenStream as TokenStream2; -use derive_utils::{syn, Result}; -use derive_utils::syn::{Expr, Ident, Type, spanned::Spanned}; +use devise::{syn, Result}; +use devise::syn::{Expr, Ident, Type, spanned::Spanned}; use http::{uri::Origin, ext::IntoOwned}; use http::route::{RouteSegment, Kind, Source}; diff --git a/core/codegen/src/bang/uri_parsing.rs b/core/codegen/src/bang/uri_parsing.rs @@ -1,8 +1,8 @@ use proc_macro::Span; -use derive_utils::{syn, Spanned}; -use derive_utils::proc_macro2::TokenStream as TokenStream2; -use derive_utils::ext::TypeExt; +use devise::{syn, Spanned}; +use devise::proc_macro2::TokenStream as TokenStream2; +use devise::ext::TypeExt; use quote::ToTokens; use self::syn::{Expr, Ident, LitStr, Path, Token, Type}; diff --git a/core/codegen/src/derive/from_form.rs b/core/codegen/src/derive/from_form.rs @@ -1,5 +1,5 @@ use proc_macro::{Span, TokenStream}; -use derive_utils::{*, ext::{TypeExt, Split3}}; +use devise::{*, ext::{TypeExt, Split3}}; #[derive(FromMeta)] crate struct Form { diff --git a/core/codegen/src/derive/from_form_value.rs b/core/codegen/src/derive/from_form_value.rs @@ -1,4 +1,4 @@ -use derive_utils::*; +use devise::*; use proc_macro::TokenStream; #[derive(FromMeta)] diff --git a/core/codegen/src/derive/responder.rs b/core/codegen/src/derive/responder.rs @@ -1,7 +1,7 @@ use quote::ToTokens; use proc_macro::TokenStream; -use derive_utils::{*, ext::TypeExt}; -use derive_utils::proc_macro2::TokenStream as TokenStream2; +use devise::{*, ext::TypeExt}; +use devise::proc_macro2::TokenStream as TokenStream2; use http_codegen::{ContentType, Status}; diff --git a/core/codegen/src/derive/uri_display.rs b/core/codegen/src/derive/uri_display.rs @@ -1,5 +1,5 @@ use proc_macro::{Span, TokenStream}; -use derive_utils::*; +use devise::*; use derive::from_form::Form; diff --git a/core/codegen/src/http_codegen.rs b/core/codegen/src/http_codegen.rs @@ -1,6 +1,6 @@ use quote::ToTokens; use proc_macro2::TokenStream as TokenStream2; -use derive_utils::{FromMeta, MetaItem, Result, ext::Split2}; +use devise::{FromMeta, MetaItem, Result, ext::Split2}; use http::{self, ext::IntoOwned}; use attribute::segments::{parse_segments, parse_segment, Segment, Kind, Source}; diff --git a/core/codegen/src/lib.rs b/core/codegen/src/lib.rs @@ -48,7 +48,7 @@ //! ``` #[macro_use] extern crate quote; -#[macro_use] extern crate derive_utils; +#[macro_use] extern crate devise; extern crate proc_macro; extern crate rocket_http as http; extern crate indexmap; @@ -64,7 +64,7 @@ mod syn_ext; use http::Method; use proc_macro::TokenStream; -crate use derive_utils::proc_macro2; +crate use devise::proc_macro2; crate static ROUTE_STRUCT_PREFIX: &str = "static_rocket_route_info_for_"; crate static CATCH_STRUCT_PREFIX: &str = "static_rocket_catch_info_for_"; diff --git a/core/codegen/src/syn_ext.rs b/core/codegen/src/syn_ext.rs @@ -1,6 +1,6 @@ //! Extensions to `syn` types. -use derive_utils::syn; +use devise::syn; use proc_macro::Diagnostic; pub fn syn_to_diag(error: syn::parse::Error) -> Diagnostic {