From d9b72ffa5485f3c253da22f09ff0a7090de7aa37 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 9 Apr 2022 11:27:14 +0300 Subject: refactor: rename Checksum to Label Label is a clearer and more accurate name for the type now that it is not just a checksum. Also, serialize a Label in tests, rather than using string literals. This is more correct, and we'll be changing serialization later. Sponsored-by: author --- src/server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server.rs') diff --git a/src/server.rs b/src/server.rs index 31a03fc..6b688d6 100644 --- a/src/server.rs +++ b/src/server.rs @@ -141,7 +141,7 @@ impl SearchHits { #[cfg(test)] mod test_search_hits { use super::{ChunkMeta, SearchHits}; - use crate::checksummer::Checksum; + use crate::label::Label; #[test] fn no_search_hits() { @@ -152,7 +152,7 @@ mod test_search_hits { #[test] fn one_search_hit() { let id = "abc".parse().unwrap(); - let sum = Checksum::sha256_from_str_unchecked("123"); + let sum = Label::sha256(b"123"); let meta = ChunkMeta::new(&sum); let mut hits = SearchHits::default(); hits.insert(id, meta); -- cgit v1.2.1