diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-03-12 07:52:05 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-03-13 08:55:48 +0200 |
commit | 29e68de7973f2b294c50b7d33ef216a8f095b9f9 (patch) | |
tree | 4103f4c460d0db422b999b4f19097cd489b2a6ca /src/chunk.rs | |
parent | 5e79c4f9b3e5789d1d40c2144ba6c3b6a868dae7 (diff) | |
download | obnam2-29e68de7973f2b294c50b7d33ef216a8f095b9f9.tar.gz |
feat! rename metadata field "sha256" to "label"
The field still contains a cleartext SHa256 of the cleartext chunk
data, but this makes it clearer that it may contain other data.
This is a breaking change: the server API won't work with an old
client, and the new client won't work with an old server. To avoid the
breakage would require more effort than is warranted at this time,
given the very small number of users of Obnam. Sorry.
Sponsored-by: author
Diffstat (limited to 'src/chunk.rs')
-rw-r--r-- | src/chunk.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chunk.rs b/src/chunk.rs index 15e3288..a37aa57 100644 --- a/src/chunk.rs +++ b/src/chunk.rs @@ -97,8 +97,8 @@ impl GenerationChunk { let json: String = serde_json::to_string(self).map_err(GenerationChunkError::JsonGenerate)?; let bytes = json.as_bytes().to_vec(); - let sha = Checksum::sha256(&bytes); - let meta = ChunkMeta::new_generation(&sha, ended); + let checksum = Checksum::sha256(&bytes); + let meta = ChunkMeta::new_generation(&checksum, ended); Ok(DataChunk::new(bytes, meta)) } } |