Skip to content

Commit c725403

Browse files
u2Vtec234
authored andcommitted
chore: fix macro clippy lint
1 parent 9c95360 commit c725403

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

crossbeam-channel/src/select_macro.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ macro_rules! crossbeam_channel_internal {
764764
let _handle: &$crate::internal::SelectHandle = &$crate::never::<()>();
765765

766766
#[allow(unused_mut)]
767-
let mut _sel = [(_handle, 0, 0 as *const u8); _LEN];
767+
let mut _sel = [(_handle, 0, ::std::ptr::null()); _LEN];
768768

769769
crossbeam_channel_internal!(
770770
@add
@@ -858,7 +858,7 @@ macro_rules! crossbeam_channel_internal {
858858

859859
match _oper {
860860
None => {
861-
::std::mem::drop($sel);
861+
{ $sel };
862862
$body
863863
}
864864
Some(_oper) => {
@@ -889,7 +889,7 @@ macro_rules! crossbeam_channel_internal {
889889

890890
match _oper {
891891
::std::option::Option::None => {
892-
::std::mem::drop($sel);
892+
{ $sel };
893893
$body
894894
}
895895
::std::option::Option::Some(_oper) => {
@@ -987,7 +987,7 @@ macro_rules! crossbeam_channel_internal {
987987
) => {{
988988
if $oper.index() == $i {
989989
let _res = $oper.recv($r);
990-
::std::mem::drop($sel);
990+
{ $sel };
991991

992992
let $res = _res;
993993
$body
@@ -1008,7 +1008,7 @@ macro_rules! crossbeam_channel_internal {
10081008
) => {{
10091009
if $oper.index() == $i {
10101010
let _res = $oper.send($s, $m);
1011-
::std::mem::drop($sel);
1011+
{ $sel };
10121012

10131013
let $res = _res;
10141014
$body

0 commit comments

Comments
 (0)