Skip to content

Commit

Permalink
add documentation for SecretKeyError to remove `#[allow(missing_doc…
Browse files Browse the repository at this point in the history
…s)]` (#5946)
  • Loading branch information
tcoratger authored Jan 4, 2024
1 parent b30c42c commit 3b0e7a5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions bin/reth/src/args/secret_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ use thiserror::Error;

/// Errors returned by loading a [`SecretKey`], including IO errors.
#[derive(Error, Debug)]
#[allow(missing_docs)]
pub enum SecretKeyError {
/// Error encountered during decoding of the secret key.
#[error(transparent)]
SecretKeyDecodeError(#[from] SecretKeyBaseError),

/// Error related to file system path operations.
#[error(transparent)]
SecretKeyFsPathError(#[from] FsPathError),

/// Represents an error when failed to access the key file.
#[error("failed to access key file {secret_file:?}: {error}")]
FailedToAccessKeyFile { error: io::Error, secret_file: PathBuf },
FailedToAccessKeyFile {
/// The encountered IO error.
error: io::Error,
/// Path to the secret key file.
secret_file: PathBuf,
},
}

/// Attempts to load a [`SecretKey`] from a specified path. If no file exists there, then it
Expand Down

0 comments on commit 3b0e7a5

Please sign in to comment.