mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
changed match
to 'matches!' (#31850)
This commit is contained in:
parent
9a76dd9325
commit
bd39e03eeb
29 changed files with 185 additions and 229 deletions
|
@ -229,10 +229,7 @@ impl Promise {
|
|||
#[allow(unsafe_code)]
|
||||
pub fn is_fulfilled(&self) -> bool {
|
||||
let state = unsafe { GetPromiseState(self.promise_obj()) };
|
||||
match state {
|
||||
PromiseState::Rejected | PromiseState::Fulfilled => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(state, PromiseState::Rejected | PromiseState::Fulfilled)
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue