Skip to content

Commit

Permalink
Use std::collections::HashMap instead of hashbrown::HashMap
Browse files Browse the repository at this point in the history
* This should not have any effect as the std::collections::HashMap
  is backed by hashbrown::HashMap and we do not do specific stuffs
  with it.

Co-authored-by:	Emmanuel Bosquet <emmanuel.bosquet@clever-cloud.com>
Signed-off-by: Florentin Dubois <florentin.dubois@clever-cloud.com>
  • Loading branch information
FlorentinDUBOIS committed Aug 3, 2022
1 parent 9054d9c commit a8dde73
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ include = [
[dependencies]
cookie-factory = "^0.3.2"
foreign-types-shared = "^0.1.1"
hashbrown = "^0.12.2"
hdrhistogram = "^7.5.0"
hpack = "^0.3.0"
idna = "^0.2.3"
Expand Down
1 change: 0 additions & 1 deletion lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ extern crate url;
#[macro_use]
extern crate sozu_command_lib as sozu_command;
extern crate cookie_factory;
extern crate hashbrown;
extern crate hpack;
extern crate idna;
extern crate lazycell;
Expand Down
5 changes: 2 additions & 3 deletions lib/src/router/pattern_trie.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{fmt::Debug, iter, str};
use std::{collections::HashMap, fmt::Debug, iter, str};

use hashbrown::HashMap;
use regex::bytes::Regex;

pub type Key = Vec<u8>;
Expand Down Expand Up @@ -790,6 +789,6 @@ mod tests {

#[test]
fn size() {
assert_size!(TrieNode<u32>, 152);
assert_size!(TrieNode<u32>, 136);
}
}
6 changes: 2 additions & 4 deletions lib/src/router/trie.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use std::{fmt::Debug, iter, str};

use hashbrown::HashMap;
use std::{collections::HashMap, fmt::Debug, iter, str};

pub type Key = Vec<u8>;
pub type KeyValue<K, V> = (K, V);
Expand Down Expand Up @@ -707,6 +705,6 @@ mod tests {

#[test]
fn size() {
assert_size!(TrieNode<u32>, 128);
assert_size!(TrieNode<u32>, 112);
}
}

0 comments on commit a8dde73

Please sign in to comment.