Skip to content

Commit

Permalink
feat(server-common)!: remove Clone for Config
Browse files Browse the repository at this point in the history
  • Loading branch information
jbr committed Apr 17, 2024
1 parent 63e23d1 commit fcaf248
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions server-common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,32 +245,6 @@ impl<ServerType: Server> Config<ServerType, ()> {
}
}

impl<ServerType, AcceptorType> Clone for Config<ServerType, AcceptorType>
where
ServerType: Server,
AcceptorType: Acceptor<ServerType::Transport> + Clone,
{
fn clone(&self) -> Self {
if self.has_binding() {
eprintln!("cloning a Config with a pre-bound listener will not clone the listener. this may be a panic in the future.");
}

Self {
acceptor: self.acceptor.clone(),
port: self.port,
host: self.host.clone(),
server: PhantomData,
nodelay: self.nodelay,
swansong: self.swansong.clone(),
register_signals: self.register_signals,
max_connections: self.max_connections,
info: AsyncCell::shared(),
binding: RwLock::new(None),
http_config: self.http_config,
}
}
}

impl<ServerType: Server> Default for Config<ServerType, ()> {
fn default() -> Self {
#[cfg(unix)]
Expand Down

0 comments on commit fcaf248

Please sign in to comment.