mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-22 20:52:27 +00:00
fix possible issue with NoContent implicit return and database connection use
This commit is contained in:
parent
e2cf2238fd
commit
f7600977c8
1 changed files with 1 additions and 2 deletions
|
@ -7,7 +7,6 @@ use syn::{
|
|||
ItemFn,
|
||||
ReturnType,
|
||||
Type,
|
||||
TypePath,
|
||||
parse_macro_input
|
||||
};
|
||||
use std::str::FromStr;
|
||||
|
@ -154,7 +153,7 @@ pub fn expand_method(method : Method, attrs : TokenStream, item : TokenStream) -
|
|||
use #krate::export::{Future, FromState};
|
||||
let #repo_ident = <#krate::export::Repo<#conn_ty_real>>::borrow_from(&#state_ident).clone();
|
||||
#repo_ident.run::<_, #ret, ()>(move |#conn_ident| {
|
||||
Ok(#block)
|
||||
Ok({#block})
|
||||
}).wait().unwrap()
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue