Removed weird ProviderError variants (#14518)

This commit is contained in:
Poulav Bhowmick
2025-02-16 04:18:29 +05:30
committed by GitHub
parent b7f173fd88
commit 07e8360c4d
5 changed files with 40 additions and 45 deletions

View File

@ -17,10 +17,7 @@ type ColumnResult<T> = ProviderResult<Option<T>>;
impl<'a> StaticFileCursor<'a> {
/// Returns a new [`StaticFileCursor`].
pub fn new(jar: &'a NippyJar<SegmentHeader>, reader: Arc<DataReader>) -> ProviderResult<Self> {
Ok(Self(
NippyJarCursor::with_reader(jar, reader)
.map_err(|err| ProviderError::NippyJar(err.to_string()))?,
))
Ok(Self(NippyJarCursor::with_reader(jar, reader).map_err(ProviderError::other)?))
}
/// Returns the current `BlockNumber` or `TxNumber` of the cursor depending on the kind of