Skip to content

Commit 622c663

Browse files
committed
appease clippy
1 parent a3d4452 commit 622c663

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

tests/foo-ffi/src/callback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub unsafe fn callback_source_create() -> *mut CallbackSource {
4343

4444
pub unsafe fn callback_source_destroy(cb_source: *mut CallbackSource) {
4545
if !cb_source.is_null() {
46-
Box::from_raw(cb_source);
46+
drop(Box::from_raw(cb_source));
4747
}
4848
}
4949

tests/foo-ffi/src/class.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub unsafe fn test_class_create(value: u32) -> *mut TestClass {
1515
pub unsafe fn test_class_destroy(testclass: *mut TestClass) {
1616
CONSTRUCTION_COUNTER -= 1;
1717
if !testclass.is_null() {
18-
Box::from_raw(testclass);
18+
drop(Box::from_raw(testclass));
1919
};
2020
}
2121

tests/foo-ffi/src/collection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub unsafe fn string_collection_create() -> *mut StringCollection {
3737

3838
pub unsafe fn string_collection_destroy(col: *mut StringCollection) {
3939
if !col.is_null() {
40-
Box::from_raw(col);
40+
drop(Box::from_raw(col));
4141
}
4242
}
4343

@@ -57,7 +57,7 @@ pub unsafe fn string_collection_with_reserve_create(
5757

5858
pub unsafe fn string_collection_with_reserve_destroy(col: *mut StringCollectionWithReserve) {
5959
if !col.is_null() {
60-
Box::from_raw(col);
60+
drop(Box::from_raw(col));
6161
}
6262
}
6363

tests/foo-ffi/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub(crate) unsafe fn class_with_password_get_special_value(
5555

5656
pub(crate) unsafe fn class_with_password_destroy(instance: *mut crate::ClassWithPassword) {
5757
if !instance.is_null() {
58-
Box::from_raw(instance);
58+
drop(Box::from_raw(instance));
5959
}
6060
}
6161

tests/foo-ffi/src/primitive_pointers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub(crate) fn primitive_pointers_create() -> *mut crate::PrimitivePointers {
2121
}
2222

2323
pub(crate) unsafe fn primitive_pointers_destroy(instance: *mut crate::PrimitivePointers) {
24-
Box::from_raw(instance);
24+
drop(Box::from_raw(instance));
2525
}
2626

2727
pub(crate) unsafe fn primitive_pointers_get_bool(

tests/foo-ffi/src/strings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub unsafe fn string_class_create() -> *mut StringClass {
1919

2020
pub unsafe fn string_class_destroy(string_class: *mut StringClass) {
2121
if !string_class.is_null() {
22-
Box::from_raw(string_class);
22+
drop(Box::from_raw(string_class));
2323
}
2424
}
2525

tests/foo-ffi/src/thread_class.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub(crate) fn thread_class_create(
8080

8181
pub(crate) unsafe fn thread_class_destroy(instance: *mut ThreadClass) {
8282
if !instance.is_null() {
83-
Box::from_raw(instance);
83+
drop(Box::from_raw(instance));
8484
}
8585
}
8686

0 commit comments

Comments
 (0)