chore(GH-118094): explicitly mark _elem as unused

Signed-off-by: Petr Portnov <me@progrm-jarvis.ru>
This commit is contained in:
Petr Portnov 2023-11-20 18:33:55 +03:00
parent 2fd9442afc
commit 91fcdde51b
No known key found for this signature in database
GPG Key ID: 3568C53A7C68A6EA

View File

@ -64,7 +64,7 @@ impl SpecFromElem for u8 {
// but this cannot be implemented currently // but this cannot be implemented currently
impl SpecFromElem for () { impl SpecFromElem for () {
#[inline] #[inline]
fn from_elem<A: Allocator>(elem: (), n: usize, alloc: A) -> Vec<(), A> { fn from_elem<A: Allocator>(_elem: (), n: usize, alloc: A) -> Vec<(), A> {
let mut v = Vec::with_capacity_in(n, alloc); let mut v = Vec::with_capacity_in(n, alloc);
// SAFETY: the capacity has just been set to `n` and `()` // SAFETY: the capacity has just been set to `n` and `()`
// is a ZST with trivial `Clone` implementation // is a ZST with trivial `Clone` implementation