Skip to content

Commit ce372d7

Browse files
committed
Change: error handling in HashSumNameLoader
Refactors the error handling in HashSumNameLoader from SumsFileCorrupt to LoadError, making it more general and easier to handle.
1 parent fc8b504 commit ce372d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/feed/src/verify/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl<'a, R: Read> HashSumNameLoader<'a, R> {
126126
let buf = reader
127127
.as_bufreader(Hasher::Sha256.sum_file())
128128
.map(|x| x.lines())
129-
.map_err(|_| Error::SumsFileCorrupt(Hasher::Sha256))?;
129+
.map_err(Error::LoadError)?;
130130
Ok(Self::new(buf, reader, Hasher::Sha256))
131131
}
132132
}

0 commit comments

Comments
 (0)