Use js_class for static method bindings as well

This commit is contained in:
Danielle Pham 2018-08-12 23:16:18 -04:00
parent 539e987cdb
commit aa735d221a

View File

@ -473,7 +473,10 @@ impl<'a> ConvertToAst<(BindgenAttrs, &'a Option<String>)> for syn::ForeignItemFn
kind,
}
} else if let Some(cls) = opts.static_method_of() {
let class = cls.to_string();
let class = opts
.js_class()
.map(Into::into)
.unwrap_or_else(|| cls.to_string());
let ty = ident_ty(cls.clone());
let kind = ast::MethodKind::Operation(ast::Operation {