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 @@ fn from_elem<A: Allocator>(elem: u8, n: usize, alloc: A) -> Vec<u8, A> {
// but this cannot be implemented currently
impl SpecFromElem for () {
#[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);
// SAFETY: the capacity has just been set to `n` and `()`
// is a ZST with trivial `Clone` implementation