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