delete excess mem::forget

This commit is contained in:
vms 2020-07-28 01:02:17 +03:00
parent a898493202
commit 88afe8feaa
2 changed files with 8 additions and 4 deletions

View File

@ -27,14 +27,20 @@ static mut RESULT_SIZE: AtomicUsize = AtomicUsize::new(0);
#[no_mangle]
pub unsafe fn get_result_ptr() -> usize {
log(format!("sdk.get_result_ptr, returns {}\n", *RESULT_PTR.get_mut()));
log(format!(
"sdk.get_result_ptr, returns {}\n",
*RESULT_PTR.get_mut()
));
*RESULT_PTR.get_mut()
}
#[no_mangle]
pub unsafe fn get_result_size() -> usize {
log(format!("sdk.get_result_size, returns {}\n", *RESULT_SIZE.get_mut()));
log(format!(
"sdk.get_result_size, returns {}\n",
*RESULT_SIZE.get_mut()
));
*RESULT_SIZE.get_mut()
}

View File

@ -108,8 +108,6 @@ fn generate_deserializer_fn(record: &fce_ast_types::AstRecordItem) -> proc_macro
#deserializer
std::mem::forget(raw_record);
#type_constructor
}
}