diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-15 18:12:50 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-09-18 17:52:36 +0300 |
commit | 6ed6b1bc75b1995a7740ff28bc26a908b91f37c8 (patch) | |
tree | 48575e9335123d5f6a228038f71565e42dbf9366 /src/benchmark.rs | |
parent | d6728974b98a821b8d633197abd97cf2fc9357f5 (diff) | |
download | obnam2-6ed6b1bc75b1995a7740ff28bc26a908b91f37c8.tar.gz |
refactor: define a Checksum type and use it where appropriate
This will make it harder to compare, say, a SHA-256 and a SHA3, later,
when we add more checksum types.
Sponsored-by: author
Diffstat (limited to 'src/benchmark.rs')
-rw-r--r-- | src/benchmark.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/benchmark.rs b/src/benchmark.rs index 3c94f92..e5057ac 100644 --- a/src/benchmark.rs +++ b/src/benchmark.rs @@ -1,3 +1,4 @@ +use crate::checksummer::Checksum; use crate::chunk::DataChunk; use crate::chunkid::ChunkId; use crate::chunkmeta::ChunkMeta; @@ -15,7 +16,7 @@ impl ChunkGenerator { } impl Iterator for ChunkGenerator { - type Item = (ChunkId, String, DataChunk); + type Item = (ChunkId, Checksum, DataChunk); fn next(&mut self) -> Option<Self::Item> { if self.next >= self.goal { |