summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index b48bf61..f18bdfb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -76,7 +76,7 @@ pub fn load_game_versions(path: &str) -> MLE<Vec<GameVersion>> {
76 let versions: Vec<GameVersion> = serde_json::from_str(&data)?; 76 let versions: Vec<GameVersion> = serde_json::from_str(&data)?;
77 Ok(versions) 77 Ok(versions)
78} 78}
79 79
80impl VersionLevel { 80impl VersionLevel {
81 81
82 pub fn from(str: &str) -> Self { 82 pub fn from(str: &str) -> Self {
@@ -87,8 +87,9 @@ impl VersionLevel {
87 } 87 }
88 } 88 }
89 89
90 pub fn get(self, versions_path: &str) -> MLE<String> { 90 pub async fn get(self, versions_path: &str, force_update: bool) -> MLE<String> {
91 let path = format!("{}/versions.json", versions_path); 91 let path = format!("{}/versions.json", versions_path);
92 check_game_versions(&path, force_update).await?;
92 let mut versions = load_game_versions(&path)?.into_iter(); 93 let mut versions = load_game_versions(&path)?.into_iter();
93 94
94 match self { 95 match self {