summaryrefslogtreecommitdiffstats
path: root/headers/src/convert.rs
diff options
context:
space:
mode:
Diffstat (limited to 'headers/src/convert.rs')
-rw-r--r--headers/src/convert.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/headers/src/convert.rs b/headers/src/convert.rs
index 1153965..c076cfd 100644
--- a/headers/src/convert.rs
+++ b/headers/src/convert.rs
@@ -13,16 +13,18 @@ pub trait HeaderTryInto<T>: Sized {
fn try_into(self) -> Result<T, ComponentCreationError>;
}
-impl<F, T> HeaderTryInto<T> for F where T: HeaderTryFrom<F> {
+impl<F, T> HeaderTryInto<T> for F
+where
+ T: HeaderTryFrom<F>,
+{
fn try_into(self) -> Result<T, ComponentCreationError> {
T::try_from(self)
}
}
-
impl<T> HeaderTryFrom<T> for T {
fn try_from(val: T) -> Result<Self, ComponentCreationError> {
- Ok( val )
+ Ok(val)
}
}
@@ -34,4 +36,4 @@ impl<T> HeaderTryFrom<T> for T {
// fn try_from(val: F) -> Result<T, Error> {
// Ok( val.into() )
// }
-//} \ No newline at end of file
+//}