Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Drop redundant "Error" from enum variants
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Czabaniuk committed Nov 30, 2023
1 parent 6a36967 commit 2280c5b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ledger/src/bank_forks_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub enum BankForksUtilsError {
"failed to load bank: {source}, full snapshot archive: {full_snapshot_archive}, \
incremental snapshot archive: {incremental_snapshot_archive}"
)]
BankFromSnapshotsArchiveError {
BankFromSnapshotsArchive {
source: snapshot_utils::SnapshotError,
full_snapshot_archive: String,
incremental_snapshot_archive: String,
Expand All @@ -53,13 +53,13 @@ pub enum BankForksUtilsError {
NoBankSnapshotDirectory { flag: String, value: String },

#[error("failed to load bank: {source}, snapshot: {path}")]
BankFromSnapshotsDirectoryError {
BankFromSnapshotsDirectory {
source: snapshot_utils::SnapshotError,
path: PathBuf,
},

#[error("failed to process blockstore from root: {0}")]
ProcessBlockstoreFromRootError(#[source] BlockstoreProcessorError),
ProcessBlockstoreFromRoot(#[source] BlockstoreProcessorError),
}

pub type LoadResult = result::Result<
Expand Down Expand Up @@ -111,7 +111,7 @@ pub fn load(
entry_notification_sender,
&AbsRequestSender::default(),
)
.map_err(BankForksUtilsError::ProcessBlockstoreFromRootError)?;
.map_err(BankForksUtilsError::ProcessBlockstoreFromRoot)?;

Ok((bank_forks, leader_schedule_cache, starting_snapshot_hashes))
}
Expand Down Expand Up @@ -289,7 +289,7 @@ fn bank_forks_from_snapshot(
accounts_update_notifier,
exit,
)
.map_err(|err| BankForksUtilsError::BankFromSnapshotsArchiveError {
.map_err(|err| BankForksUtilsError::BankFromSnapshotsArchive {
source: err,
full_snapshot_archive: full_snapshot_archive_info.path().display().to_string(),
incremental_snapshot_archive: incremental_snapshot_archive_info
Expand Down Expand Up @@ -338,7 +338,7 @@ fn bank_forks_from_snapshot(
accounts_update_notifier,
exit,
)
.map_err(|err| BankForksUtilsError::BankFromSnapshotsDirectoryError {
.map_err(|err| BankForksUtilsError::BankFromSnapshotsDirectory {
source: err,
path: bank_snapshot.snapshot_path(),
})?;
Expand Down

0 comments on commit 2280c5b

Please sign in to comment.