MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / empty

Method empty

atomic-core/src/change/format_v3/hash_table.rs:184–189  ·  view source on GitHub ↗

Create an empty dedup table. This is only useful for testing or for cases where the self hash will be set later. In normal operation, use [`new`](Self::new). # Examples ```rust use atomic_core::change::format_v3::HashDedupTable; let table = HashDedupTable::empty(); assert_eq!(table.len(), 0); ```

()

Source from the content-addressed store, hash-verified

182 /// assert_eq!(table.len(), 0);
183 /// ```
184 pub fn empty() -> Self {
185 Self {
186 hashes: Vec::new(),
187 index_map: HashMap::new(),
188 }
189 }
190
191 /// Reconstruct a dedup table from a list of hashes (read from a file).
192 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected