1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-05-09 16:10:42 +00:00

the example compiles :party:

This commit is contained in:
Dominic 2019-09-30 18:18:10 +02:00
parent 8b0d655ebb
commit 29af28ad8d
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
4 changed files with 56 additions and 51 deletions

View file

@ -36,7 +36,7 @@ pub trait WithOpenapi<D>
{
fn with_openapi<F, Title, Version>(&mut self, title : Title, version : Version, block : F)
where
F : FnOnce(OpenapiRouter<D>),
F : FnOnce((&mut D, &mut OpenapiRouter)),
Title : ToString,
Version : ToString;
}
@ -237,12 +237,12 @@ macro_rules! implDrawResourceRoutes {
{
fn with_openapi<F, Title, Version>(&mut self, title : Title, version : Version, block : F)
where
F : FnOnce(OpenapiRouter<Self>),
F : FnOnce((&mut Self, &mut OpenapiRouter)),
Title : ToString,
Version : ToString
{
let router : OpenapiRouter<Self> = OpenapiRouter::new(self, title, version);
block(router);
let mut router = OpenapiRouter::new(title, version);
block((self, &mut router));
}
}