Skip to content

Commit

Permalink
Rename ConfigResult to ConfigFileResult
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Oct 16, 2024
1 parent 0908f8c commit 1478944
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/core/src/repofile/configfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub enum ConfigFileErrorKind {
ParsingFailedForPolynomial(#[from] ParseIntError),
}

pub(crate) type ConfigResult<T> = Result<T, ConfigFileErrorKind>;
pub(crate) type ConfigFileResult<T> = Result<T, ConfigFileErrorKind>;

pub(super) mod constants {

Expand Down Expand Up @@ -148,7 +148,7 @@ impl ConfigFile {
/// * [`ConfigFileErrorKind::ParsingFailedForPolynomial`] - If the polynomial could not be parsed
///
/// [`ConfigFileErrorKind::ParsingFailedForPolynomial`]: crate::error::ConfigFileErrorKind::ParsingFailedForPolynomial
pub fn poly(&self) -> ConfigResult<u64> {
pub fn poly(&self) -> ConfigFileResult<u64> {
Ok(u64::from_str_radix(&self.chunker_polynomial, 16)
.map_err(ConfigFileErrorKind::ParsingFailedForPolynomial)?)
}
Expand All @@ -160,7 +160,7 @@ impl ConfigFile {
/// * [`ConfigFileErrorKind::ConfigVersionNotSupported`] - If the version is not supported
///
/// [`ConfigFileErrorKind::ConfigVersionNotSupported`]: crate::error::ConfigFileErrorKind::ConfigVersionNotSupported
pub fn zstd(&self) -> ConfigResult<Option<i32>> {
pub fn zstd(&self) -> ConfigFileResult<Option<i32>> {
match (self.version, self.compression) {
(1, _) | (2, Some(0)) => Ok(None),
(2, None) => Ok(Some(0)), // use default (=0) zstd compression
Expand Down

0 comments on commit 1478944

Please sign in to comment.