diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-04-09 11:27:14 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-04-16 09:04:28 +0300 |
commit | d9b72ffa5485f3c253da22f09ff0a7090de7aa37 (patch) | |
tree | ffcfc0d0b2377c95072b609095589fbf83424382 /src/client.rs | |
parent | 9f6ff22ff9a1b0a5a28d037846b1cecee4f2945c (diff) | |
download | obnam2-d9b72ffa5485f3c253da22f09ff0a7090de7aa37.tar.gz |
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
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.rs b/src/client.rs index 563921d..d8bf262 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,6 +1,5 @@ //! Client to the Obnam server HTTP API. -use crate::checksummer::Checksum; use crate::chunk::{ ClientTrust, ClientTrustError, DataChunk, GenerationChunk, GenerationChunkError, }; @@ -10,6 +9,7 @@ use crate::cipher::{CipherEngine, CipherError}; use crate::config::{ClientConfig, ClientConfigError}; use crate::generation::{FinishedGeneration, GenId, LocalGeneration, LocalGenerationError}; use crate::genlist::GenerationList; +use crate::label::Label; use log::{debug, error, info}; use reqwest::header::HeaderMap; @@ -196,7 +196,7 @@ impl BackupClient { } async fn find_client_trusts(&self) -> Result<Vec<ChunkId>, ClientError> { - let label = format!("{}", Checksum::literal("client-trust")); + let label = format!("{}", Label::literal("client-trust")); let body = match self.get("", &[("label", &label)]).await { Ok((_, body)) => body, Err(err) => return Err(err), |