rush_sync_server/server/
config.rs

1// Updated src/server/config.rs - Use Config from main config
2use crate::core::config::Config;
3
4// Remove old ServerConfig - use the one from core::config
5pub fn get_server_version() -> &'static str {
6    env!("CARGO_PKG_VERSION")
7}
8
9pub fn get_server_name() -> &'static str {
10    env!("CARGO_PKG_NAME")
11}
12
13// Legacy constants for backward compatibility
14pub const SERVER_VERSION: &str = env!("CARGO_PKG_VERSION");
15pub const SERVER_NAME: &str = env!("CARGO_PKG_NAME");
16
17// Helper to get server config from main config
18pub fn get_server_config_from_main(config: &Config) -> &crate::core::config::ServerConfig {
19    &config.server
20}
21
22// Helper to get logging config from main config
23pub fn get_logging_config_from_main(config: &Config) -> &crate::core::config::LoggingConfig {
24    &config.logging
25}