mirror of
https://github.com/GIKExe/rust_mc_serv.git
synced 2025-06-24 02:12:58 +03:00
remove server start helper
This commit is contained in:
parent
37dac26032
commit
78c1404ce8
46
src/lib.rs
46
src/lib.rs
@ -107,30 +107,30 @@ pub fn start_server(server: Arc<ServerContext>) {
|
||||
}
|
||||
|
||||
// server start helper
|
||||
pub struct Server {
|
||||
context: Arc<ServerContext>,
|
||||
}
|
||||
// pub struct Server {
|
||||
// context: Arc<ServerContext>,
|
||||
// }
|
||||
|
||||
impl Server {
|
||||
pub fn new(context: ServerContext) -> Self {
|
||||
Self {
|
||||
context: Arc::new(context),
|
||||
}
|
||||
}
|
||||
// impl Server {
|
||||
// pub fn new(context: ServerContext) -> Self {
|
||||
// Self {
|
||||
// context: Arc::new(context),
|
||||
// }
|
||||
// }
|
||||
|
||||
pub fn context(&self) -> &ServerContext {
|
||||
&self.context
|
||||
}
|
||||
// pub fn context(&self) -> &ServerContext {
|
||||
// &self.context
|
||||
// }
|
||||
|
||||
pub fn start(&self) {
|
||||
start_server(self.context.clone());
|
||||
}
|
||||
}
|
||||
// pub fn start(&self) {
|
||||
// start_server(self.context.clone());
|
||||
// }
|
||||
// }
|
||||
|
||||
impl Default for Server {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
context: Arc::new(ServerContext::new(Arc::new(Config::default()))),
|
||||
}
|
||||
}
|
||||
}
|
||||
// impl Default for Server {
|
||||
// fn default() -> Self {
|
||||
// Self {
|
||||
// context: Arc::new(ServerContext::new(Arc::new(Config::default()))),
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
Loading…
x
Reference in New Issue
Block a user