Skip to content

Commit

Permalink
Derive Default for TunnelDeviceBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Jan 2, 2025
1 parent b64f26f commit d4a8c92
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions talpid-tunnel/src/tun_provider/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ pub struct TunnelDevice {
/// A tunnel device builder.
///
/// Call [`Self::create`] to create [`TunnelDevice`] from the config.
#[derive(Default)]
pub struct TunnelDeviceBuilder {
config: Configuration,
}
Expand Down Expand Up @@ -155,13 +156,6 @@ impl TunnelDeviceBuilder {
}
}

impl Default for TunnelDeviceBuilder {
fn default() -> Self {
let config = Configuration::default();
Self { config }
}
}

impl AsRawFd for TunnelDevice {
fn as_raw_fd(&self) -> RawFd {
self.dev.as_raw_fd()
Expand Down

0 comments on commit d4a8c92

Please sign in to comment.