summaryrefslogtreecommitdiff
path: root/src/chunkmeta.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/chunkmeta.rs')
-rw-r--r--src/chunkmeta.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/chunkmeta.rs b/src/chunkmeta.rs
index 1f591c6..fe7ef4c 100644
--- a/src/chunkmeta.rs
+++ b/src/chunkmeta.rs
@@ -39,7 +39,7 @@ impl ChunkMeta {
/// Data chunks are not for generations.
pub fn new(label: &Label) -> Self {
ChunkMeta {
- label: label.to_string(),
+ label: label.serialize(),
}
}
@@ -85,14 +85,14 @@ mod test {
fn new_creates_data_chunk() {
let sum = Label::sha256(b"abcdef");
let meta = ChunkMeta::new(&sum);
- assert_eq!(meta.label(), &format!("{}", sum));
+ assert_eq!(meta.label(), sum.serialize());
}
#[test]
fn new_generation_creates_generation_chunk() {
let sum = Label::sha256(b"abcdef");
let meta = ChunkMeta::new(&sum);
- assert_eq!(meta.label(), &format!("{}", sum));
+ assert_eq!(meta.label(), sum.serialize());
}
#[test]