Skip to content

Commit

Permalink
Explicitly initialize an entry of _sel
Browse files Browse the repository at this point in the history
* It resolves a clippy warning: `zero_repeat_side_effects`
  • Loading branch information
powergee committed Jul 4, 2024
1 parent cacd1e9 commit 5602a6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crossbeam-channel/src/select_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,10 @@ macro_rules! crossbeam_channel_internal {
) => {{
const _LEN: usize = $crate::crossbeam_channel_internal!(@count ($($cases)*));
let _handle: &dyn $crate::internal::SelectHandle = &$crate::never::<()>();
let _entry = (_handle, 0, ::std::ptr::null());

#[allow(unused_mut)]
let mut _sel = [(_handle, 0, ::std::ptr::null()); _LEN];
let mut _sel = [_entry; _LEN];

$crate::crossbeam_channel_internal!(
@add
Expand Down

0 comments on commit 5602a6c

Please sign in to comment.