From 955179ab6f4c0366f6db85cb1f5e5048e5f72b87 Mon Sep 17 00:00:00 2001 From: auronandace Date: Fri, 13 Feb 2026 13:22:05 +0000 Subject: [PATCH] remove code as per feedback --- src/header/unistd/mod.rs | 1 - src/platform/allocator/mod.rs | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs index 0d5f82ba66..4e3e6a95f9 100644 --- a/src/header/unistd/mod.rs +++ b/src/header/unistd/mod.rs @@ -572,7 +572,6 @@ pub unsafe extern "C" fn gethostname(mut name: *mut c_char, mut len: size_t) -> .map(|()| 0) .or_minus_one_errno(); if err < 0 { - mem::forget(uts); // forget does nothing with Copy types return err; } for c in unsafe { uts.assume_init() }.nodename.iter() { diff --git a/src/platform/allocator/mod.rs b/src/platform/allocator/mod.rs index 06de784db8..e6c9244a35 100644 --- a/src/platform/allocator/mod.rs +++ b/src/platform/allocator/mod.rs @@ -75,14 +75,12 @@ unsafe impl GlobalAlloc for Allocator { let new = unsafe { self.alloc(Layout::from_size_align_unchecked(new_size, layout.align())) }; let old_size = layout.size(); - let old_align = layout.align(); if !new.is_null() { let size = cmp::min(old_size, new_size); unsafe { copy_nonoverlapping(ptr, new, size) }; } - drop((old_size, old_align)); // drop does nothing with Copy types unsafe { (*self.get()).lock().free(ptr) }; new