diff options
| author | 2025-01-21 17:27:57 -0600 | |
|---|---|---|
| committer | 2025-01-21 17:27:57 -0600 | |
| commit | fd81ca30769aa787b93a0dcb8330a28b1079517e (patch) | |
| tree | 2bcb24a8000eb9177204791c87a71765383cb4ad | |
| parent | strip verbatim prefix \\?\ from paths on windows (diff) | |
use regular strings for jvm arguments
the way serde encoded jvm arguments was funny
| -rw-r--r-- | src/launcher/settings.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/launcher/settings.rs b/src/launcher/settings.rs index 29d9220..e65b8b3 100644 --- a/src/launcher/settings.rs +++ b/src/launcher/settings.rs @@ -157,10 +157,10 @@ impl Default for Resolution { pub struct Profile { game_version: ProfileVersion, java_runtime: Option<String>, - instance: String, // ugly that this is a string instead of reference to an Instance but whatever I'm lazy + instance: String, #[serde(default)] - jvm_arguments: Vec<OsString>, + jvm_arguments: Vec<String>, resolution: Option<Resolution> } @@ -199,7 +199,7 @@ impl Profile { game_version: ProfileVersion::LatestRelease, java_runtime: None, instance: instance_name.into(), - jvm_arguments: DEF_JVM_ARGUMENTS.iter().map(OsString::from).collect(), + jvm_arguments: DEF_JVM_ARGUMENTS.iter().map(|s| String::from(*s)).collect(), resolution: None } } @@ -212,7 +212,7 @@ impl Profile { &self.instance } - pub fn iter_arguments(&self) -> impl Iterator<Item = &OsString> { + pub fn iter_arguments(&self) -> impl Iterator<Item = &String> { self.jvm_arguments.iter() } |
