Skip to content

Commit

Permalink
Remove Ext4Error::as_corrupt
Browse files Browse the repository at this point in the history
This method is no longer used internally, and it's not useful as a
public method since the `Corrupt` type was made opaque.
  • Loading branch information
nicholasbishop committed Feb 7, 2025
1 parent d7f42f3 commit c768a92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

* Removed `Ext4Error::as_corrupt`.

## 0.8.0

* Added `Path::to_str` and `PathBuf::to_str`.
Expand Down
10 changes: 0 additions & 10 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,6 @@ pub enum Ext4Error {
}

impl Ext4Error {
/// If the error type is [`Ext4Error::Corrupt`], get the underlying error.
#[must_use]
pub fn as_corrupt(&self) -> Option<&Corrupt> {
if let Self::Corrupt(err) = self {
Some(err)
} else {
None
}
}

/// If the error type is [`Ext4Error::Incompatible`], get the underlying error.
#[must_use]
pub fn as_incompatible(&self) -> Option<&Incompatible> {
Expand Down

0 comments on commit c768a92

Please sign in to comment.