Compare commits
No commits in common. "master" and "0.2.0" have entirely different histories.
4 changed files with 12 additions and 13 deletions
|
@ -26,8 +26,7 @@ impl ExcelCollection {
|
|||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn table_count(&self) -> usize {
|
||||
pub fn table_count(&self) -> usize {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#[must_use]
|
||||
pub fn load_or_create_config(path: &str, defaults: &str) -> String {
|
||||
std::fs::read_to_string(path).unwrap_or_else(|_| {
|
||||
std::fs::read_to_string(path).map_or_else(
|
||||
|_| {
|
||||
std::fs::write(path, defaults).unwrap();
|
||||
defaults.to_string()
|
||||
})
|
||||
},
|
||||
|data| data,
|
||||
)
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@ pub async fn query_dispatch() -> String {
|
|||
retcode: 0,
|
||||
region_list: CONFIGURATION
|
||||
.game_servers
|
||||
.values()
|
||||
.map(|c| RegionInfo {
|
||||
.iter()
|
||||
.map(|(_, c)| RegionInfo {
|
||||
name: c.name.clone(),
|
||||
title: c.title.clone(),
|
||||
env_type: c.env_type.clone(),
|
||||
|
@ -46,7 +46,7 @@ pub async fn query_gateway(
|
|||
Gateserver {
|
||||
retcode: 0,
|
||||
ip: server_config.gateserver_ip.clone(),
|
||||
port: u32::from(server_config.gateserver_port),
|
||||
port: server_config.gateserver_port as u32,
|
||||
asset_bundle_url: version_config.asset_bundle_url.clone(),
|
||||
ex_resource_url: version_config.ex_resource_url.clone(),
|
||||
lua_url: version_config.lua_url.clone(),
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
use std::path::Path;
|
||||
|
||||
pub fn main() {
|
||||
let proto_file = "StarRail.proto";
|
||||
if Path::new(proto_file).exists() {
|
||||
if std::path::Path::new(proto_file).exists() {
|
||||
println!("cargo:rerun-if-changed={proto_file}");
|
||||
|
||||
prost_build::Config::new()
|
||||
|
|
Loading…
Reference in a new issue