Skip to content

Commit ff37d48

Browse files
committed
Expose ErrnoFilter for other crates
Signed-off-by: Alexander Larsson <alexl@redhat.com>
1 parent 0aa069a commit ff37d48

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

crates/composefs/src/util.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ pub fn parse_sha256(string: impl AsRef<str>) -> Result<Sha256Digest> {
173173
Ok(value)
174174
}
175175

176-
pub(crate) trait ErrnoFilter<T> {
176+
/// Utility for filtering ErrnoResult errors.
177+
pub trait ErrnoFilter<T> {
178+
/// Parse a ErrnoResult<T> into ErrnoResult<Option<T>> where the option is
179+
/// None if the errno was a specified errno (often used with ENOENT).
177180
fn filter_errno(self, ignored: Errno) -> ErrnoResult<Option<T>>;
178181
}
179182

0 commit comments

Comments
 (0)