Remove unneeded Sync and Send impls

This commit is contained in:
2020-10-18 20:59:18 -04:00
parent 6513b2903a
commit e0f0f26943
5 changed files with 0 additions and 44 deletions

View File

@@ -77,16 +77,6 @@ pub struct RawMerchandiseVec {
pub cap: usize,
}
// Required in order to store results in a thread-safe static cache.
// Rust complains that the raw pointers cannot be Send + Sync. We only ever:
// a) read the values in C++/Papyrus land, and it's okay if multiple threads do that.
// b) from_raw() the pointers back into rust values and then drop them. This could be problematic if another script is still reading at the same time, but I'm pretty sure that won't happen.
// Besides, it's already unsafe to read from a raw pointer
unsafe impl Send for RawMerchandiseVec {}
unsafe impl Send for RawMerchandise {}
unsafe impl Sync for RawMerchandiseVec {}
unsafe impl Sync for RawMerchandise {}
#[no_mangle]
pub extern "C" fn create_merchandise_list(
api_url: *const c_char,