Skip to content

Commit

Permalink
remove Default impl
Browse files Browse the repository at this point in the history
  • Loading branch information
jdockerty committed Dec 5, 2023
1 parent bd95e56 commit 28ce85f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@ use tracing::info;
#[derive(Debug)]
pub struct HttpProxy {}

impl Default for HttpProxy {
fn default() -> Self {
Self {}
}
}

impl HttpProxy {
pub fn new() -> &'static HttpProxy {
return &Self {};
&Self {}
}
/// Helper for creating the relevant HTTP response to write into a `TcpStream`.
async fn construct_response(response: Response) -> Result<String> {
Expand Down
8 changes: 1 addition & 7 deletions src/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@ pub struct TcpProxy {}

impl TcpProxy {
pub fn new() -> &'static TcpProxy {
return &Self {};
}
}

impl Default for TcpProxy {
fn default() -> Self {
Self {}
&Self {}
}
}

Expand Down

0 comments on commit 28ce85f

Please sign in to comment.