Skip to content

Commit 04201ac

Browse files
committed
delete unnecessary do_nothing function
1 parent cd3e9a8 commit 04201ac

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/buffer.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ impl<T: TensorType> Buffer<T> {
6868
if len > 0 {
6969
panic!("Failed to allocate {} aligned by {}", alloc_size, align);
7070
}
71-
(*inner).data_deallocator = Some(do_nothing);
7271
} else {
7372
(*inner).data_deallocator = Some(deallocator);
7473
}
@@ -147,9 +146,6 @@ unsafe extern "C" fn deallocator(data: *mut std_c_void, _length: size_t) {
147146
aligned_alloc::aligned_free(data as *mut ());
148147
}
149148

150-
unsafe extern "C" fn do_nothing(data: *mut std_c_void, _length: size_t) {
151-
}
152-
153149
impl<T: TensorType> Drop for Buffer<T> {
154150
fn drop(&mut self) {
155151
if self.owned {

0 commit comments

Comments
 (0)