Skip to content

Commit

Permalink
macros: fix select macro to process 64 branches (#4519)
Browse files Browse the repository at this point in the history
Co-authored-by: DevSabb <devsabb@local>
  • Loading branch information
DevSabb and DevSabb committed Feb 21, 2022
1 parent 43c224f commit e8f19e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tokio/src/macros/select.rs
Expand Up @@ -801,6 +801,9 @@ macro_rules! count {
(_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) => {
63
};
(_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) => {
64
};
}

#[macro_export]
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/macros_select.rs
Expand Up @@ -461,6 +461,7 @@ async fn many_branches() {
x = async { 1 } => x,
x = async { 1 } => x,
x = async { 1 } => x,
x = async { 1 } => x,
};

assert_eq!(1, num);
Expand Down

0 comments on commit e8f19e7

Please sign in to comment.