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

Removes unused snapshot errors #34812

Merged

Conversation

brooksprumo
Copy link
Contributor

Problem

There are unused snapshot errors that wrap a std::io::Error. These ones in particular can be annoying when printing, because sometimes the source error (i.e. std::io::Error) does include its source in the error message, and sometimes it does not. This makes logging errors inconsistent.

Longterm, we'll have specific errors for each case, and thus will not have this ambiguity. In the meantime, prevent new uses of ambiguous IO errors.

Summary of Changes

  • Removes unused SnapshotNewFromDirError::Io variant
  • Removes unused SnapshotError::IoWithSourceAndFile variant

@brooksprumo brooksprumo self-assigned this Jan 17, 2024
@brooksprumo brooksprumo marked this pull request as ready for review January 17, 2024 18:27
@brooksprumo brooksprumo requested a review from apfitzge January 17, 2024 18:27
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3fa44e6) 81.8% compared to head (f6973a9) 81.8%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34812   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         825      825           
  Lines      223134   223130    -4     
=======================================
+ Hits       182534   182535    +1     
+ Misses      40600    40595    -5     

Copy link
Contributor

@apfitzge apfitzge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - pr simply removes unused error variants.

@brooksprumo brooksprumo merged commit d878899 into solana-labs:master Jan 17, 2024
35 checks passed
@brooksprumo brooksprumo deleted the snap/errors/new_from_dir/remove-io branch January 17, 2024 19:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants