mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
fix(napi-derive): prevent constructor redundant in debug mode
This commit is contained in:
parent
270b6bda38
commit
88c4175c2d
@ -244,7 +244,7 @@ pub fn check_recorded_struct_for_impl(ident: &Ident, opts: &BindgenAttrs) -> Bin
|
||||
|
||||
let mut map = state.parsed.borrow_mut();
|
||||
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 {
|
||||
bail_span!(
|
||||
ident,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user