Avoid an unnecessary intermediate &mut reference

The `NonNull::as_mut` method returns a mut *reference*, rather than the mut
*pointer* that is intended here.
This commit is contained in:
Zalathar
2025-08-15 19:54:59 +10:00
parent 44f5ec7d56
commit 61932e1222

View File

@@ -99,7 +99,7 @@ impl Drop for OwnedTargetMachine {
// llvm::LLVMRustCreateTargetMachine OwnedTargetMachine is not copyable so there is no
// double free or use after free.
unsafe {
llvm::LLVMRustDisposeTargetMachine(self.tm_unique.as_mut());
llvm::LLVMRustDisposeTargetMachine(self.tm_unique.as_ptr());
}
}
}