Moved IntoResult trait to own file outside feature

This commit is contained in:
Martin Berg Alstad
2024-06-27 11:49:41 +02:00
parent aba28d1612
commit cdc8f5e463
3 changed files with 12 additions and 8 deletions

5
src/traits.rs Normal file
View File

@ -0,0 +1,5 @@
/// Converts a type T into a Result<T, E>
pub trait IntoResult<T> {
type Error;
fn into_result(self) -> Result<T, Self::Error>;
}