Skip wrapping if function returns Dynamicc.
This commit is contained in:
@@ -3,6 +3,7 @@ use std::collections::HashMap;
|
||||
use quote::{quote, ToTokens};
|
||||
|
||||
use crate::attrs::ExportScope;
|
||||
use crate::function::flatten_type_groups;
|
||||
use crate::function::{ExportedFn, FnSpecialAccess};
|
||||
use crate::module::Module;
|
||||
|
||||
@@ -174,14 +175,6 @@ pub(crate) fn generate_body(
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn flatten_type_groups(ty: &syn::Type) -> &syn::Type {
|
||||
match ty {
|
||||
syn::Type::Group(syn::TypeGroup { ref elem, .. })
|
||||
| syn::Type::Paren(syn::TypeParen { ref elem, .. }) => flatten_type_groups(elem.as_ref()),
|
||||
_ => ty,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn check_rename_collisions(fns: &Vec<ExportedFn>) -> Result<(), syn::Error> {
|
||||
fn make_key(name: impl ToString, itemfn: &ExportedFn) -> String {
|
||||
itemfn
|
||||
|
Reference in New Issue
Block a user