MCPcopy Create free account
hub / github.com/cosdata/cosdata / new

Method new

src/models/common.rs:504–512  ·  view source on GitHub ↗
(size: u8)

Source from the content-addressed store, hash-verified

502#[allow(unused)]
503impl<K: Eq + Hash, V> TSHashTable<K, V> {
504 pub fn new(size: u8) -> Self {
505 let hash_table_list = (0..size)
506 .map(|_| Arc::new(Mutex::new(HashMap::new())))
507 .collect();
508 TSHashTable {
509 hash_table_list,
510 size,
511 }
512 }
513
514 pub fn hash_key(&self, k: &K) -> usize {
515 let mut hasher = DefaultHasher::new();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected