fmt fix
Continuous integration / Check (push) Successful in 28s
Continuous integration / Test Suite (push) Successful in 34s
Continuous integration / Rustfmt (push) Successful in 26s
Continuous integration / Clippy (push) Failing after 28s
Continuous integration / build (push) Successful in 33s
Continuous integration / Check (push) Successful in 28s
Continuous integration / Test Suite (push) Successful in 34s
Continuous integration / Rustfmt (push) Successful in 26s
Continuous integration / Clippy (push) Failing after 28s
Continuous integration / build (push) Successful in 33s
This commit is contained in:
+11
-7
@@ -85,7 +85,9 @@ impl BlankScreen {
|
|||||||
fn handle_events(&mut self) {
|
fn handle_events(&mut self) {
|
||||||
match event::read().expect("failed to read event") {
|
match event::read().expect("failed to read event") {
|
||||||
Event::Key(key_event) if key_event.kind == KeyEventKind::Press => {
|
Event::Key(key_event) if key_event.kind == KeyEventKind::Press => {
|
||||||
if let KeyCode::Char('q') = key_event.code { self.exit = true }
|
if let KeyCode::Char('q') = key_event.code {
|
||||||
|
self.exit = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
@@ -119,9 +121,10 @@ impl DeviceSelectScreen {
|
|||||||
let mut input_devices: Vec<(Device, SupportedStreamConfig)> = Vec::new();
|
let mut input_devices: Vec<(Device, SupportedStreamConfig)> = Vec::new();
|
||||||
|
|
||||||
if let Some(default_input_device) = host.default_input_device()
|
if let Some(default_input_device) = host.default_input_device()
|
||||||
&& let Ok(default_config) = default_input_device.default_input_config() {
|
&& let Ok(default_config) = default_input_device.default_input_config()
|
||||||
input_devices.push((default_input_device.clone(), default_config));
|
{
|
||||||
}
|
input_devices.push((default_input_device.clone(), default_config));
|
||||||
|
}
|
||||||
|
|
||||||
if let Ok(possible_input_devices) = host.input_devices() {
|
if let Ok(possible_input_devices) = host.input_devices() {
|
||||||
for possible_input_device in possible_input_devices {
|
for possible_input_device in possible_input_devices {
|
||||||
@@ -134,9 +137,10 @@ impl DeviceSelectScreen {
|
|||||||
let mut output_devices: Vec<(Device, SupportedStreamConfig)> = Vec::new();
|
let mut output_devices: Vec<(Device, SupportedStreamConfig)> = Vec::new();
|
||||||
|
|
||||||
if let Some(default_output_device) = host.default_output_device()
|
if let Some(default_output_device) = host.default_output_device()
|
||||||
&& let Ok(default_config) = default_output_device.default_output_config() {
|
&& let Ok(default_config) = default_output_device.default_output_config()
|
||||||
output_devices.push((default_output_device.clone(), default_config));
|
{
|
||||||
}
|
output_devices.push((default_output_device.clone(), default_config));
|
||||||
|
}
|
||||||
|
|
||||||
if let Ok(possible_output_devices) = host.output_devices() {
|
if let Ok(possible_output_devices) = host.output_devices() {
|
||||||
for possible_output_device in possible_output_devices {
|
for possible_output_device in possible_output_devices {
|
||||||
|
|||||||
+4
-3
@@ -85,9 +85,10 @@ async fn main() {
|
|||||||
|
|
||||||
for (&other_client_id, other_client) in clients.iter() {
|
for (&other_client_id, other_client) in clients.iter() {
|
||||||
if other_client_id != client_id
|
if other_client_id != client_id
|
||||||
&& let Some(destination_udp) = other_client.udp_addr {
|
&& let Some(destination_udp) = other_client.udp_addr
|
||||||
let _ = udp_socket.send_to(&buf[..len], destination_udp).await;
|
{
|
||||||
}
|
let _ = udp_socket.send_to(&buf[..len], destination_udp).await;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user