fix borrow_mut

This commit is contained in:
Salem Yaslem 2023-10-21 23:31:52 +03:00
parent 5f847a021c
commit 5f079b86f4

View File

@ -78,21 +78,18 @@ impl WaylandRecorder {
self.filename = filename.clone();
let mut first_empty_signal_called = false;
while let Some(msg) = message_stream.try_next().await.expect("failed to get message") {
match msg.message_type() {
MessageType::Signal => {
let (_, response) = msg.body::<(u32, HashMap<&str, Value>)>().expect("failed to get body");
let (response_num, response) = msg.body::<(u32, HashMap<&str, Value>)>().expect("failed to get body");
if response_num > 0 {
return false;
}
if response.len() == 0 {
if first_empty_signal_called {
return false;
} else {
first_empty_signal_called = true;
continue;
}
}
if response.contains_key("session_handle") {
self.handle_session(