summaryrefslogtreecommitdiffstats
path: root/src/os/shared.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/shared.rs')
-rw-r--r--src/os/shared.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/os/shared.rs b/src/os/shared.rs
index 4ef25a9..ae42022 100644
--- a/src/os/shared.rs
+++ b/src/os/shared.rs
@@ -35,9 +35,11 @@ impl Iterator for TerminalEvents {
pub(crate) fn get_datalink_channel(
interface: &NetworkInterface,
) -> Result<Box<dyn DataLinkReceiver>, GetInterfaceErrorKind> {
- let mut config = Config::default();
- config.read_timeout = Some(time::Duration::new(1, 0));
- config.read_buffer_size = 65536;
+ let config = Config {
+ read_timeout: Some(time::Duration::new(1, 0)),
+ read_buffer_size: 65536,
+ ..Default::default()
+ };
match datalink::channel(interface, config) {
Ok(Ethernet(_tx, rx)) => Ok(rx),