all: add (Clone)Cell::is_some and is_none
This commit is contained in:
parent
7a67784502
commit
54d93f84da
32 changed files with 98 additions and 62 deletions
|
|
@ -5,7 +5,7 @@ use {
|
|||
test_error::TestError, test_ifs::test_screenshot::TestJayScreenshot,
|
||||
test_object::TestObject, test_transport::TestTransport, testrun::ParseFull,
|
||||
},
|
||||
utils::buffd::MsgParser,
|
||||
utils::{buffd::MsgParser, cell_ext::CellExt},
|
||||
wire::{
|
||||
jay_compositor::{self, *},
|
||||
jay_screenshot::Dmabuf,
|
||||
|
|
@ -23,7 +23,7 @@ pub struct TestJayCompositor {
|
|||
|
||||
impl TestJayCompositor {
|
||||
pub async fn get_client_id(&self) -> Result<ClientId, TestError> {
|
||||
if self.client_id.get().is_none() {
|
||||
if self.client_id.is_none() {
|
||||
self.tran.send(GetClientId { self_id: self.id })?;
|
||||
}
|
||||
self.tran.sync().await;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ impl<T> Default for TestExpectedEventHolder<T> {
|
|||
|
||||
impl<T> TestExpectedEventHolder<T> {
|
||||
pub fn expect(self: &Rc<Self>) -> TestResult<TestExpectedEvent<T>> {
|
||||
if self.data.get().is_some() {
|
||||
if self.data.is_some() {
|
||||
bail!("There is already an expected event data");
|
||||
}
|
||||
let data = Rc::new(TestExpectedEventData {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue