diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-09 12:57:54 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-09 14:52:09 +0100 |
commit | 757638df78813c5f8c5872b2818221a7ed689f4b (patch) | |
tree | c8ca82706b4b731655d2b5708f1a2a4921d4c9f1 /src/source | |
parent | 900719e3b89476c7134d0be4b3b90f1725671e2b (diff) |
Change implementation to return Ok(()) on success
This changes the source file hash verification mechanism to return an
Ok(()) on success and an Err(_) on failure.
Returning a bool seems to be the right way, but it is not because if the
verification fails, we print the error message anyways, so there is no
point in having a bool around.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/source')
-rw-r--r-- | src/source/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/source/mod.rs b/src/source/mod.rs index 77f7f14..cf96f33 100644 --- a/src/source/mod.rs +++ b/src/source/mod.rs @@ -80,7 +80,7 @@ impl SourceEntry { Ok(()) } - pub async fn verify_hash(&self) -> Result<bool> { + pub async fn verify_hash(&self) -> Result<()> { use tokio::io::AsyncReadExt; let p = self.source_file_path(); |