mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 17:13:11 +03:00
fix borrow_mut
This commit is contained in:
parent
5f847a021c
commit
5f079b86f4
@ -78,21 +78,18 @@ impl WaylandRecorder {
|
|||||||
|
|
||||||
self.filename = filename.clone();
|
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") {
|
while let Some(msg) = message_stream.try_next().await.expect("failed to get message") {
|
||||||
match msg.message_type() {
|
match msg.message_type() {
|
||||||
MessageType::Signal => {
|
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 response.len() == 0 {
|
||||||
if first_empty_signal_called {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
first_empty_signal_called = true;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if response.contains_key("session_handle") {
|
if response.contains_key("session_handle") {
|
||||||
self.handle_session(
|
self.handle_session(
|
||||||
|
Loading…
Reference in New Issue
Block a user