mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Rename Promise::is_settled to Promise::is_fulfilled
This commit is contained in:
parent
dabecfade6
commit
860f2d806f
2 changed files with 2 additions and 2 deletions
|
@ -187,7 +187,7 @@ impl Promise {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn is_settled(&self) -> bool {
|
||||
pub fn is_fulfilled(&self) -> bool {
|
||||
let state = unsafe { GetPromiseState(self.promise_obj()) };
|
||||
match state {
|
||||
PromiseState::Rejected | PromiseState::Fulfilled => true,
|
||||
|
|
|
@ -114,7 +114,7 @@ impl JobQueue {
|
|||
} else {
|
||||
// Step 2
|
||||
let mut last_job = job_queue.pop().unwrap();
|
||||
if job == last_job && !last_job.promise.is_settled() {
|
||||
if job == last_job && !last_job.promise.is_fulfilled() {
|
||||
last_job.append_equivalent_job(job);
|
||||
job_queue.push(last_job);
|
||||
debug!("appended equivalent job");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue