We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f408eb3 commit 3e444f2Copy full SHA for 3e444f2
rust/src/interaction.rs
@@ -296,7 +296,9 @@ impl FormInputBuilder {
296
result.type_ = BNFormInputFieldType::AddressFormField;
297
result.prompt = prompt.as_ref().as_ptr() as *const c_char;
298
if let Some(view) = view {
299
- result.view = view.handle;
+ // the view is being moved into result, there is no need to clone
300
+ // and drop is intentionally being avoided with `Ref::into_raw`
301
+ result.view = unsafe { Ref::into_raw(view) }.handle;
302
}
303
result.currentAddress = current_address.unwrap_or(0);
304
result.hasDefault = default.is_some();
0 commit comments