You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/08/25 01:56:07 UTC

[incubator-opendal] 01/01: chore: Make C Binding clippy happy

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch fix-c-binding-clippy
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit c9eb55c667fdd412355ee00021115a16cabe4870
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Fri Aug 25 09:55:46 2023 +0800

    chore: Make C Binding clippy happy
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 bindings/c/src/types.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bindings/c/src/types.rs b/bindings/c/src/types.rs
index 77d6a1c22..89d02826e 100644
--- a/bindings/c/src/types.rs
+++ b/bindings/c/src/types.rs
@@ -300,7 +300,7 @@ impl opendal_operator_options {
     pub unsafe extern "C" fn opendal_operator_options_free(
         options: *const opendal_operator_options,
     ) {
-        let _ = unsafe { Box::from_raw((*options).inner as *mut HashMap<String, String>) };
+        let _ = unsafe { Box::from_raw((*options).inner) };
         let _ = unsafe { Box::from_raw(options as *mut opendal_operator_options) };
     }
 }
@@ -348,7 +348,7 @@ impl opendal_blocking_lister {
     #[no_mangle]
     pub unsafe extern "C" fn opendal_lister_free(p: *const opendal_blocking_lister) {
         unsafe {
-            let _ = Box::from_raw((*p).inner as *mut od::BlockingLister);
+            let _ = Box::from_raw((*p).inner);
             let _ = Box::from_raw(p as *mut opendal_blocking_lister);
         }
     }