Skip to content

Commit

Permalink
Use crates.io compatible internal package names.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioBenitez committed Jun 9, 2021
1 parent 1aa551a commit 6961a71
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions contrib/dyn_templates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions contrib/dyn_templates/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ 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;

/// 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;
Expand Down
8 changes: 4 additions & 4 deletions core/http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/http/src/raw_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down
6 changes: 3 additions & 3 deletions core/http/src/uri/absolute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
/// }
Expand Down
4 changes: 2 additions & 2 deletions core/http/src/uri/asterisk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
/// }
Expand Down
6 changes: 3 additions & 3 deletions core/http/src/uri/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
/// }
Expand Down
4 changes: 2 additions & 2 deletions core/http/src/uri/fmt/uri_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions core/http/src/uri/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
6 changes: 3 additions & 3 deletions core/http/src/uri/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
/// }
Expand Down
6 changes: 3 additions & 3 deletions core/http/src/uri/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
/// }
Expand Down
4 changes: 2 additions & 2 deletions core/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions core/lib/src/serde/uuid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6961a71

Please sign in to comment.