Upgrade ordermap dependency to indexmap. (#227)
Avoid the need for indexmap-based applications to build ordermap, which is the old name for indexmap. Signed-off-by: Brian Smith <brian@briansmith.org>
This commit is contained in:
@@ -35,7 +35,7 @@ log = "0.4.1"
|
|||||||
fnv = "1.0.5"
|
fnv = "1.0.5"
|
||||||
slab = "0.4.0"
|
slab = "0.4.0"
|
||||||
string = "0.1"
|
string = "0.1"
|
||||||
ordermap = "0.2"
|
indexmap = "0.4"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio-timer = "0.1"
|
tokio-timer = "0.1"
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ extern crate slab;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
extern crate string;
|
extern crate string;
|
||||||
extern crate ordermap;
|
extern crate indexmap;
|
||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
#[cfg_attr(feature = "unstable", allow(missing_docs))]
|
#[cfg_attr(feature = "unstable", allow(missing_docs))]
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ use super::*;
|
|||||||
|
|
||||||
use slab;
|
use slab;
|
||||||
|
|
||||||
use ordermap::{self, OrderMap};
|
use indexmap::{self, IndexMap};
|
||||||
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::ops;
|
use std::ops;
|
||||||
@@ -11,7 +11,7 @@ use std::ops;
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(super) struct Store {
|
pub(super) struct Store {
|
||||||
slab: slab::Slab<(StoreId, Stream)>,
|
slab: slab::Slab<(StoreId, Stream)>,
|
||||||
ids: OrderMap<StreamId, (usize, StoreId)>,
|
ids: IndexMap<StreamId, (usize, StoreId)>,
|
||||||
counter: StoreId,
|
counter: StoreId,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,11 +61,11 @@ pub(super) enum Entry<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(super) struct OccupiedEntry<'a> {
|
pub(super) struct OccupiedEntry<'a> {
|
||||||
ids: ordermap::OccupiedEntry<'a, StreamId, (usize, StoreId)>,
|
ids: indexmap::map::OccupiedEntry<'a, StreamId, (usize, StoreId)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) struct VacantEntry<'a> {
|
pub(super) struct VacantEntry<'a> {
|
||||||
ids: ordermap::VacantEntry<'a, StreamId, (usize, StoreId)>,
|
ids: indexmap::map::VacantEntry<'a, StreamId, (usize, StoreId)>,
|
||||||
slab: &'a mut slab::Slab<(StoreId, Stream)>,
|
slab: &'a mut slab::Slab<(StoreId, Stream)>,
|
||||||
counter: &'a mut usize,
|
counter: &'a mut usize,
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@ impl Store {
|
|||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Store {
|
Store {
|
||||||
slab: slab::Slab::new(),
|
slab: slab::Slab::new(),
|
||||||
ids: OrderMap::new(),
|
ids: IndexMap::new(),
|
||||||
counter: 0,
|
counter: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ impl Store {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn find_entry(&mut self, id: StreamId) -> Entry {
|
pub fn find_entry(&mut self, id: StreamId) -> Entry {
|
||||||
use self::ordermap::Entry::*;
|
use self::indexmap::map::Entry::*;
|
||||||
|
|
||||||
match self.ids.entry(id) {
|
match self.ids.entry(id) {
|
||||||
Occupied(e) => Entry::Occupied(OccupiedEntry {
|
Occupied(e) => Entry::Occupied(OccupiedEntry {
|
||||||
|
|||||||
Reference in New Issue
Block a user