Use matches! for YieldSource::is_await
This commit is contained in:
parent
85e688e4c3
commit
fcb385cfb1
1 changed files with 1 additions and 4 deletions
|
@ -2078,10 +2078,7 @@ pub enum YieldSource {
|
|||
|
||||
impl YieldSource {
|
||||
pub fn is_await(&self) -> bool {
|
||||
match self {
|
||||
YieldSource::Await { .. } => true,
|
||||
YieldSource::Yield => false,
|
||||
}
|
||||
matches!(self, YieldSource::Await { .. })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue