diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-04-19 04:53:35 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-04-19 04:53:35 +0000 |
commit | 8882409f31ddb4d77cb94dd6c57f27af1b3310d5 (patch) | |
tree | 62bb67504c47747f8ce202f4eb4121bb3d051223 /src/chunkid.rs | |
parent | 8da3f80d296dc1891159fe4fdc1787cecd9730d0 (diff) | |
parent | 18c0f4afab29e17c050208234becbfb5e2973746 (diff) | |
download | obnam2-8882409f31ddb4d77cb94dd6c57f27af1b3310d5.tar.gz |
Merge branch 'liw/checksum-types-try2' into 'main'
add support for migrating to new checksum types
Closes #203
See merge request obnam/obnam!228
Diffstat (limited to 'src/chunkid.rs')
-rw-r--r-- | src/chunkid.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/chunkid.rs b/src/chunkid.rs index 3534627..50fc3d3 100644 --- a/src/chunkid.rs +++ b/src/chunkid.rs @@ -3,7 +3,7 @@ //! Chunk identifiers are chosen by the server. Each chunk has a //! unique identifier, which isn't based on the contents of the chunk. -use crate::checksummer::Checksum; +use crate::label::Label; use rusqlite::types::ToSqlOutput; use rusqlite::ToSql; use serde::{Deserialize, Serialize}; @@ -53,8 +53,8 @@ impl ChunkId { } /// Return the SHA256 checksum of the identifier. - pub fn sha256(&self) -> Checksum { - Checksum::sha256(self.id.as_bytes()) + pub fn sha256(&self) -> Label { + Label::sha256(self.id.as_bytes()) } } |