Skip to content

Commit fcb385c

Browse files
committed
Use matches! for YieldSource::is_await
1 parent 85e688e commit fcb385c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/rustc_hir/src/hir.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -2078,10 +2078,7 @@ pub enum YieldSource {
20782078

20792079
impl YieldSource {
20802080
pub fn is_await(&self) -> bool {
2081-
match self {
2082-
YieldSource::Await { .. } => true,
2083-
YieldSource::Yield => false,
2084-
}
2081+
matches!(self, YieldSource::Await { .. })
20852082
}
20862083
}
20872084

0 commit comments

Comments
 (0)