mirror of https://github.com/rwf2/Rocket.git
Use crates.io compatible internal package names.
This commit is contained in:
parent
1aa551ada6
commit
6961a717d8
|
@ -12,8 +12,8 @@ license = "MIT OR Apache-2.0"
|
|||
edition = "2018"
|
||||
|
||||
[features]
|
||||
tera = ["_tera"]
|
||||
handlebars = ["_handlebars"]
|
||||
tera = ["tera_"]
|
||||
handlebars = ["handlebars_"]
|
||||
|
||||
[dependencies]
|
||||
serde = "1.0"
|
||||
|
@ -27,12 +27,12 @@ version = "0.5.0-dev"
|
|||
path = "../../core/lib"
|
||||
default-features = false
|
||||
|
||||
[dependencies._tera]
|
||||
[dependencies.tera_]
|
||||
package = "tera"
|
||||
version = "1.10.0"
|
||||
optional = true
|
||||
|
||||
[dependencies._handlebars]
|
||||
[dependencies.handlebars_]
|
||||
package = "handlebars"
|
||||
version = "3.0"
|
||||
optional = true
|
||||
|
|
|
@ -142,7 +142,7 @@ compile_error!("at least one of \"tera\" or \"handlebars\" features must be enab
|
|||
/// The tera templating engine library, reexported.
|
||||
#[doc(inline)]
|
||||
#[cfg(feature = "tera")]
|
||||
pub use _tera as tera;
|
||||
pub use tera_ as tera;
|
||||
|
||||
#[cfg(feature = "tera")]
|
||||
mod tera_templates;
|
||||
|
@ -150,7 +150,7 @@ mod tera_templates;
|
|||
/// The handlebars templating engine library, reexported.
|
||||
#[doc(inline)]
|
||||
#[cfg(feature = "handlebars")]
|
||||
pub use _handlebars as handlebars;
|
||||
pub use handlebars_ as handlebars;
|
||||
|
||||
#[cfg(feature = "handlebars")]
|
||||
mod handlebars_templates;
|
||||
|
|
|
@ -18,8 +18,8 @@ edition = "2018"
|
|||
default = []
|
||||
tls = ["tokio-rustls"]
|
||||
private-cookies = ["cookie/private", "cookie/key-expansion"]
|
||||
serde = ["uncased/with-serde-alloc", "_serde"]
|
||||
uuid = ["_uuid"]
|
||||
serde = ["uncased/with-serde-alloc", "serde_"]
|
||||
uuid = ["uuid_"]
|
||||
|
||||
[dependencies]
|
||||
smallvec = "1.0"
|
||||
|
@ -47,14 +47,14 @@ version = "0.14.9"
|
|||
default-features = false
|
||||
features = ["http1", "http2", "runtime", "server", "stream"]
|
||||
|
||||
[dependencies._serde]
|
||||
[dependencies.serde_]
|
||||
package = "serde"
|
||||
version = "1.0"
|
||||
optional = true
|
||||
default-features = false
|
||||
features = ["std"]
|
||||
|
||||
[dependencies._uuid]
|
||||
[dependencies.uuid_]
|
||||
package = "uuid"
|
||||
version = "0.8"
|
||||
optional = true
|
||||
|
|
|
@ -853,7 +853,7 @@ impl RawStr {
|
|||
|
||||
#[cfg(feature = "serde")]
|
||||
mod serde {
|
||||
use _serde::{ser, de, Serialize, Deserialize};
|
||||
use serde_::{ser, de, Serialize, Deserialize};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
|
@ -71,18 +71,18 @@ use crate::uri::{Authority, Path, Query, Data, Error, as_utf8_unchecked, fmt};
|
|||
///
|
||||
/// ```rust
|
||||
/// # #[cfg(feature = "serde")] mod serde {
|
||||
/// # use _serde as serde;
|
||||
/// # use serde_ as serde;
|
||||
/// use serde::{Serialize, Deserialize};
|
||||
/// use rocket::http::uri::Absolute;
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriOwned {
|
||||
/// uri: Absolute<'static>,
|
||||
/// }
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriBorrowed<'a> {
|
||||
/// uri: Absolute<'a>,
|
||||
/// }
|
||||
|
|
|
@ -9,12 +9,12 @@ use crate::uri::Error;
|
|||
///
|
||||
/// ```rust
|
||||
/// # #[cfg(feature = "serde")] mod serde {
|
||||
/// # use _serde as serde;
|
||||
/// # use serde_ as serde;
|
||||
/// use serde::{Serialize, Deserialize};
|
||||
/// use rocket::http::uri::Asterisk;
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriOwned {
|
||||
/// uri: Asterisk,
|
||||
/// }
|
||||
|
|
|
@ -27,18 +27,18 @@ use crate::uri::{as_utf8_unchecked, error::Error};
|
|||
///
|
||||
/// ```rust
|
||||
/// # #[cfg(feature = "serde")] mod serde {
|
||||
/// # use _serde as serde;
|
||||
/// # use serde_ as serde;
|
||||
/// use serde::{Serialize, Deserialize};
|
||||
/// use rocket::http::uri::Authority;
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriOwned {
|
||||
/// uri: Authority<'static>,
|
||||
/// }
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriBorrowed<'a> {
|
||||
/// uri: Authority<'a>,
|
||||
/// }
|
||||
|
|
|
@ -409,8 +409,8 @@ impl<T: UriDisplay<Query>, E> UriDisplay<Query> for Result<T, E> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "uuid")] impl_with_display!(_uuid::Uuid);
|
||||
#[cfg(feature = "uuid")] crate::impl_from_uri_param_identity!(_uuid::Uuid);
|
||||
#[cfg(feature = "uuid")] impl_with_display!(uuid_::Uuid);
|
||||
#[cfg(feature = "uuid")] crate::impl_from_uri_param_identity!(uuid_::Uuid);
|
||||
|
||||
// And finally, the `Ignorable` trait, which has sugar of `_` in the `uri!`
|
||||
// macro, which expands to a typecheck.
|
||||
|
|
|
@ -8,8 +8,8 @@ macro_rules! impl_serde {
|
|||
use std::marker::PhantomData;
|
||||
use super::*;
|
||||
|
||||
use _serde::ser::{Serialize, Serializer};
|
||||
use _serde::de::{Deserialize, Deserializer, Error, Visitor};
|
||||
use serde_::ser::{Serialize, Serializer};
|
||||
use serde_::de::{Deserialize, Deserializer, Error, Visitor};
|
||||
|
||||
impl<'a> Serialize for $T {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
|
|
|
@ -92,18 +92,18 @@ use crate::{RawStr, RawStrBuf};
|
|||
///
|
||||
/// ```rust
|
||||
/// # #[cfg(feature = "serde")] mod serde {
|
||||
/// # use _serde as serde;
|
||||
/// # use serde_ as serde;
|
||||
/// use serde::{Serialize, Deserialize};
|
||||
/// use rocket::http::uri::Origin;
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriOwned {
|
||||
/// uri: Origin<'static>,
|
||||
/// }
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriBorrowed<'a> {
|
||||
/// uri: Origin<'a>,
|
||||
/// }
|
||||
|
|
|
@ -52,18 +52,18 @@ use crate::parse::{Extent, IndexedStr};
|
|||
///
|
||||
/// ```rust
|
||||
/// # #[cfg(feature = "serde")] mod serde {
|
||||
/// # use _serde as serde;
|
||||
/// # use serde_ as serde;
|
||||
/// use serde::{Serialize, Deserialize};
|
||||
/// use rocket::http::uri::Reference;
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriOwned {
|
||||
/// uri: Reference<'static>,
|
||||
/// }
|
||||
///
|
||||
/// #[derive(Deserialize, Serialize)]
|
||||
/// # #[serde(crate = "_serde")]
|
||||
/// # #[serde(crate = "serde_")]
|
||||
/// struct UriBorrowed<'a> {
|
||||
/// uri: Reference<'a>,
|
||||
/// }
|
||||
|
|
|
@ -24,13 +24,13 @@ tls = ["rocket_http/tls"]
|
|||
secrets = ["rocket_http/private-cookies"]
|
||||
json = ["serde_json", "tokio/io-util"]
|
||||
msgpack = ["rmp-serde", "tokio/io-util"]
|
||||
uuid = ["_uuid", "rocket_http/uuid"]
|
||||
uuid = ["uuid_", "rocket_http/uuid"]
|
||||
|
||||
[dependencies]
|
||||
# Serialization dependencies.
|
||||
serde_json = { version = "1.0.26", optional = true }
|
||||
rmp-serde = { version = "0.15.0", optional = true }
|
||||
_uuid = { package = "uuid", version = "0.8", optional = true, features = ["serde"] }
|
||||
uuid_ = { package = "uuid", version = "0.8", optional = true, features = ["serde"] }
|
||||
|
||||
# Non-optional, core dependencies from here on out.
|
||||
futures = "0.3.0"
|
||||
|
|
|
@ -95,13 +95,13 @@ use crate::form::{self, FromFormField, ValueField};
|
|||
/// # }
|
||||
/// ```
|
||||
///
|
||||
pub use _uuid::Uuid;
|
||||
pub use uuid_::Uuid;
|
||||
|
||||
pub use _uuid::{Builder, Variant, Version};
|
||||
pub use uuid_::{Builder, Variant, Version};
|
||||
|
||||
/// Type alias for the error returned on [`FromParam`] or [`FromFormField`]
|
||||
/// failure.
|
||||
pub type Error = <_uuid::Uuid as std::str::FromStr>::Err;
|
||||
pub type Error = <uuid_::Uuid as std::str::FromStr>::Err;
|
||||
|
||||
impl<'a> FromParam<'a> for Uuid {
|
||||
type Error = Error;
|
||||
|
|
Loading…
Reference in New Issue