Skip to content

Commit

Permalink
chore(GH-118094): explicitly mark _elem as unused
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Portnov <[email protected]>
  • Loading branch information
JarvisCraft committed Nov 20, 2023
1 parent 2fd9442 commit 91fcdde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/vec/spec_from_elem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl SpecFromElem for u8 {
// 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
Expand Down

0 comments on commit 91fcdde

Please sign in to comment.