bugfix: Reintroduce Error trait impl for SoftBufferError

This commit is contained in:
Fenhl 2023-07-13 03:43:49 +02:00 committed by GitHub
parent abb7a4e9ac
commit 1f326b2199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,6 +137,8 @@ impl fmt::Display for SoftBufferError {
}
}
impl std::error::Error for SoftBufferError {}
/// Convenient wrapper to cast errors into SoftBufferError.
pub(crate) trait SwResultExt<T> {
fn swbuf_err(self, msg: impl Into<String>) -> Result<T, SoftBufferError>;