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
|
// server start helper
|
||||||
pub struct Server {
|
// pub struct Server {
|
||||||
context: Arc<ServerContext>,
|
// context: Arc<ServerContext>,
|
||||||
}
|
// }
|
||||||
|
|
||||||
impl Server {
|
// impl Server {
|
||||||
pub fn new(context: ServerContext) -> Self {
|
// pub fn new(context: ServerContext) -> Self {
|
||||||
Self {
|
// Self {
|
||||||
context: Arc::new(context),
|
// context: Arc::new(context),
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
pub fn context(&self) -> &ServerContext {
|
// pub fn context(&self) -> &ServerContext {
|
||||||
&self.context
|
// &self.context
|
||||||
}
|
// }
|
||||||
|
|
||||||
pub fn start(&self) {
|
// pub fn start(&self) {
|
||||||
start_server(self.context.clone());
|
// start_server(self.context.clone());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
impl Default for Server {
|
// impl Default for Server {
|
||||||
fn default() -> Self {
|
// fn default() -> Self {
|
||||||
Self {
|
// Self {
|
||||||
context: Arc::new(ServerContext::new(Arc::new(Config::default()))),
|
// context: Arc::new(ServerContext::new(Arc::new(Config::default()))),
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user