Skip to content

Commit 1c44bb6

Browse files
committed
it was that easy the entire time
1 parent ac97385 commit 1c44bb6

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ tokio = { version = "1.47.1", features = ["full"] }
1212
zip = "4.5.0"
1313
toml = "0.9.5"
1414
chrono = "0.4.42"
15-
16-
[env]
17-
Config-version = "V1"

src/config.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ use std::{
88
#[derive(Deserialize, Serialize, Debug, Clone)]
99
#[serde(default)]
1010
pub struct Config {
11-
pub config_version: String,
12-
1311
/// Path to the folder containing the mod jar's
1412
pub target_path: PathBuf,
1513

@@ -34,7 +32,6 @@ pub struct Config {
3432
impl Default for Config {
3533
fn default() -> Self {
3634
Self {
37-
config_version: std::env::var("Config-version").expect("Something went very wrong because why doesnt a config version exist"),
3835
target_path: Path::new(".").into(),
3936
server_version: String::new(),
4037
loader_version: String::new(),
@@ -63,6 +60,7 @@ impl Config {
6360

6461
let mut parsed_config: Self = toml::from_str(&input_str).unwrap();
6562
parsed_config.path = path.as_ref().to_path_buf();
63+
parsed_config.save()?;
6664

6765
Ok(parsed_config)
6866
}

0 commit comments

Comments
 (0)