From c3b6c542e83be6d62e842e3ce7fc1f8c8d3a97b6 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Sun, 25 Feb 2018 20:32:10 -0800 Subject: [PATCH] Update from 'ordermap' to 'indexmap' 0.4. --- codegen/Cargo.toml | 2 +- codegen/src/lib.rs | 2 +- codegen/src/parser/uri_macro.rs | 4 ++-- lib/Cargo.toml | 2 +- lib/src/http/header.rs | 6 +++--- lib/src/lib.rs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index bf6a60cc..db1eaf6e 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -16,7 +16,7 @@ plugin = true [dependencies] rocket = { version = "0.4.0-dev", path = "../lib/" } -ordermap = "0.3" +indexmap = "0.4" log = "0.4" [dev-dependencies] diff --git a/codegen/src/lib.rs b/codegen/src/lib.rs index 476d9697..6b5df4ad 100644 --- a/codegen/src/lib.rs +++ b/codegen/src/lib.rs @@ -230,7 +230,7 @@ extern crate syntax_ext; extern crate syntax_pos; extern crate rustc_plugin; extern crate rocket; -extern crate ordermap; +extern crate indexmap; #[macro_use] mod utils; mod parser; diff --git a/codegen/src/parser/uri_macro.rs b/codegen/src/parser/uri_macro.rs index b1620962..6cc2decf 100644 --- a/codegen/src/parser/uri_macro.rs +++ b/codegen/src/parser/uri_macro.rs @@ -11,7 +11,7 @@ use syntax::parse::parser::{Parser, PathStyle}; use syntax::print::pprust::ty_to_string; use syntax::ptr::P; -use ordermap::OrderMap; +use indexmap::IndexMap; #[derive(Debug)] enum Arg { @@ -224,7 +224,7 @@ impl InternalUriParams { None => unnamed(&vec![]), Some(Spanned { node: Args::Unnamed(ref args), .. }) => unnamed(args), Some(Spanned { node: Args::Named(ref args), .. }) => { - let mut params: OrderMap>> = self.fn_args.iter() + let mut params: IndexMap>> = self.fn_args.iter() .map(|&(ident, _)| (ident.node.name, None)) .collect(); diff --git a/lib/Cargo.toml b/lib/Cargo.toml index a47d0f76..85dbd843 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -33,7 +33,7 @@ pear_codegen = "0.0.13" rustls = { version = "0.12.0", optional = true } hyper = { version = "0.10.13", default-features = false } hyper-sync-rustls = { version = "=0.3.0-rc.2", features = ["server"], optional = true } -ordermap = "0.3" +indexmap = "0.4" isatty = "0.1" [dependencies.cookie] diff --git a/lib/src/http/header.rs b/lib/src/http/header.rs index 571d6386..afa107ec 100644 --- a/lib/src/http/header.rs +++ b/lib/src/http/header.rs @@ -1,7 +1,7 @@ use std::borrow::{Borrow, Cow}; use std::fmt; -use ordermap::OrderMap; +use indexmap::IndexMap; use http::uncased::{Uncased, UncasedStr}; @@ -117,7 +117,7 @@ impl<'h> fmt::Display for Header<'h> { /// returns values for headers of names "AbC", "ABC", "abc", and so on. #[derive(Clone, Debug, PartialEq, Default)] pub struct HeaderMap<'h> { - headers: OrderMap, Vec>> + headers: IndexMap, Vec>> } impl<'h> HeaderMap<'h> { @@ -132,7 +132,7 @@ impl<'h> HeaderMap<'h> { /// ``` #[inline(always)] pub fn new() -> HeaderMap<'h> { - HeaderMap { headers: OrderMap::new() } + HeaderMap { headers: IndexMap::new() } } /// Returns true if `self` contains a header with the name `name`. diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 417cbf2a..c28dda0f 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -112,7 +112,7 @@ extern crate time; extern crate memchr; extern crate base64; extern crate smallvec; -extern crate ordermap; +extern crate indexmap; extern crate isatty; #[cfg(test)] #[macro_use] extern crate lazy_static;