Update 'uuid' dependency to '0.7'.

This commit is contained in:
Christophe Courtaut 2018-09-09 22:20:11 +02:00 committed by jeb
parent bac186fc0d
commit 7b050ebaae
3 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ rocket = { version = "0.4.0-dev", path = "../../core/lib/" }
log = "0.4" log = "0.4"
# UUID dependencies. # UUID dependencies.
uuid = { version = ">= 0.5, <= 0.6", optional = true } uuid = { version = "0.7", optional = true }
# Serialization and templating dependencies. # Serialization and templating dependencies.
serde = { version = "1.0", optional = true } serde = { version = "1.0", optional = true }

View File

@ -7,7 +7,7 @@ use std::ops::Deref;
use rocket::request::{FromParam, FromFormValue}; use rocket::request::{FromParam, FromFormValue};
use rocket::http::RawStr; use rocket::http::RawStr;
pub use self::uuid_ext::ParseError as UuidParseError; pub use self::uuid_ext::parser::ParseError as UuidParseError;
/// Implements `FromParam` and `FormFormValue` for accepting UUID values from /// Implements `FromParam` and `FormFormValue` for accepting UUID values from
/// the [uuid](https://github.com/rust-lang-nursery/uuid) crate. /// the [uuid](https://github.com/rust-lang-nursery/uuid) crate.
@ -125,7 +125,7 @@ impl PartialEq<uuid_ext::Uuid> for Uuid {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::uuid_ext; use super::uuid_ext;
use super::{Uuid, UuidParseError}; use super::Uuid;
use super::FromParam; use super::FromParam;
use super::FromStr; use super::FromStr;
@ -161,9 +161,9 @@ mod test {
} }
#[test] #[test]
#[should_panic(expected = "InvalidLength")]
fn test_from_param_invalid() { fn test_from_param_invalid() {
let uuid_str = "c1aa1e3b-9614-4895-9ebd-705255fa5bc2p"; let uuid_str = "c1aa1e3b-9614-4895-9ebd-705255fa5bc2p";
let uuid_result = Uuid::from_param(uuid_str.into()); Uuid::from_param(uuid_str.into()).unwrap();
assert_eq!(uuid_result, Err(UuidParseError::InvalidLength(37)));
} }
} }

View File

@ -7,7 +7,7 @@ publish = false
[dependencies] [dependencies]
rocket = { path = "../../core/lib" } rocket = { path = "../../core/lib" }
rocket_codegen = { path = "../../core/codegen" } rocket_codegen = { path = "../../core/codegen" }
uuid = ">= 0.5, <= 0.6" uuid = "0.7"
lazy_static = "1.0" lazy_static = "1.0"
[dependencies.rocket_contrib] [dependencies.rocket_contrib]