This commit is contained in:
David Pedersen
2022-03-12 22:23:52 +01:00
parent 08534a5795
commit 6309e7043c
+2 -4
View File
@@ -31,7 +31,7 @@ where
}
}
pub fn get<H, T>(mut self, path: &str, mut handler: H) -> Self
pub fn get<H, T>(mut self, path: &str, handler: H) -> Self
where
H: OpenApiHandler<T, B>,
T: 'static,
@@ -43,7 +43,7 @@ where
self
}
pub fn post<H, T>(mut self, path: &str, mut handler: H) -> Self
pub fn post<H, T>(mut self, path: &str, handler: H) -> Self
where
H: OpenApiHandler<T, B>,
T: 'static,
@@ -71,8 +71,6 @@ pub trait OpenApiHandler<T, B>: Handler<T, B> {
}
}
pub type SetOperationField<H, T, B> = MapOperation<H, T, B, Box<dyn FnOnce(&mut Operation)>>;
pub struct MapOperation<H, T, B, F> {
handler: H,
f: F,