pub unsafe extern "C" fn opendal_writer_free(ptr: *mut opendal_writer) {
if !ptr.is_null() {
let _ = (*ptr).deref_mut().close(); // NOTE HERE: the error is ignored
drop(Box::from_raw((*ptr).inner as *mut core::BlockingWriter));
drop(Box::from_raw(ptr));
}
}
close the writer maybe failed, but the error is ignored.
The program may seem to succeed, but the write operation fails silently.