Skip to content

Commit

Permalink
Fix Clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pcwalton committed Jul 13, 2022
1 parent c47be32 commit 3bc117a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cxx-async/src/execlet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ pub unsafe extern "C" fn cxxasync_execlet_create() -> *const RustExeclet {
// C++ calls this to increment the reference count on an execlet.
#[no_mangle]
#[doc(hidden)]
#[allow(clippy::redundant_clone)]
pub unsafe extern "C" fn cxxasync_execlet_add_ref(this: *mut RustExeclet) {
let execlet = Execlet::from_raw_ref(this); // +1; ref count is now +1
mem::forget(execlet.clone()); // +1; ref count is now +2
Expand Down

0 comments on commit 3bc117a

Please sign in to comment.