fix(napi-derive): prevent constructor redundant in debug mode
This commit is contained in:
parent
270b6bda38
commit
88c4175c2d
1 changed files with 1 additions and 1 deletions
|
@ -244,7 +244,7 @@ pub fn check_recorded_struct_for_impl(ident: &Ident, opts: &BindgenAttrs) -> Bin
|
||||||
|
|
||||||
let mut map = state.parsed.borrow_mut();
|
let mut map = state.parsed.borrow_mut();
|
||||||
if let Some(parsed) = map.get_mut(&struct_name) {
|
if let Some(parsed) = map.get_mut(&struct_name) {
|
||||||
if opts.constructor().is_some() {
|
if opts.constructor().is_some() && !cfg!(debug_assertions) {
|
||||||
if parsed.ctor_defined {
|
if parsed.ctor_defined {
|
||||||
bail_span!(
|
bail_span!(
|
||||||
ident,
|
ident,
|
||||||
|
|
Loading…
Reference in a new issue