Skip to main content

emptyhashtable

Function emptyhashtable 

Source
pub fn emptyhashtable<T>(ht: &mut HashMap<String, T>)
Expand description

Port of emptyhashtable(HashTable ht) from Src/hashtable.c:519.

C body: resizehashtable(ht, ht->hsize); — drop all nodes while keeping the bucket array. Rust HashMap::clear preserves capacity, matching the semantic.