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 Dec 30, 2024
1 parent e092863 commit 6fc6725
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 @@ -112,6 +112,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 @@ -150,13 +151,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 6fc6725

Please sign in to comment.