mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 1715209 - [geckodriver] Fix handling of implicit session delete return value. r=webdriver-reviewers,whimboo
The arguments to map_or_else were the wrong way around. Since it's easier to read in this case switch over to an explicit match statement. Differential Revision: https://phabricator.services.mozilla.com/D117155
This commit is contained in:
parent
9083983080
commit
6d2acef1e8
@ -133,12 +133,10 @@ impl<T: WebDriverHandler<U>, U: WebDriverExtensionRoute> Dispatcher<T, U> {
|
||||
),
|
||||
command: WebDriverCommand::DeleteSession,
|
||||
};
|
||||
self.handler
|
||||
.handle_command(&self.session, delete_session)
|
||||
.map_or_else(
|
||||
|_| SessionTeardownKind::Deleted,
|
||||
|_| SessionTeardownKind::NotDeleted,
|
||||
)
|
||||
match self.handler.handle_command(&self.session, delete_session) {
|
||||
Ok(_) => SessionTeardownKind::Deleted,
|
||||
Err(_) => SessionTeardownKind::NotDeleted,
|
||||
}
|
||||
}
|
||||
_ => kind,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user