diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -40,7 +40,6 @@ pub enum Modloader { | |||
40 | 40 | ||
41 | impl Modloader { | 41 | impl Modloader { |
42 | /// # Errors | 42 | /// # Errors |
43 | /// # Panics | ||
44 | pub fn from(string: &str) -> MLE<Modloader> { | 43 | pub fn from(string: &str) -> MLE<Modloader> { |
45 | match string { | 44 | match string { |
46 | "forge" => Ok(Modloader::Forge), | 45 | "forge" => Ok(Modloader::Forge), |
@@ -75,7 +74,6 @@ pub enum VersionLevel { | |||
75 | /// Checks if update needed (time) | 74 | /// Checks if update needed (time) |
76 | /// if yes: get versions, update | 75 | /// if yes: get versions, update |
77 | /// # Errors | 76 | /// # Errors |
78 | /// # Panics | ||
79 | pub async fn check_game_versions(path: &str, force: bool) -> MLE<()> { | 77 | pub async fn check_game_versions(path: &str, force: bool) -> MLE<()> { |
80 | let p = ProgressBar::new(1); | 78 | let p = ProgressBar::new(1); |
81 | p.set_style(ProgressStyle::with_template(STYLE_MESSAGE).map_err(|_| { | 79 | p.set_style(ProgressStyle::with_template(STYLE_MESSAGE).map_err(|_| { |
@@ -90,7 +88,7 @@ pub async fn check_game_versions(path: &str, force: bool) -> MLE<()> { | |||
90 | return Ok(()); | 88 | return Ok(()); |
91 | } | 89 | } |
92 | 90 | ||
93 | let versions = get_game_versions().await; | 91 | let versions = get_game_versions().await?; |
94 | remove_file(path)?; | 92 | remove_file(path)?; |
95 | let mut file = File::create(path)?; | 93 | let mut file = File::create(path)?; |
96 | file.write_all(serde_json::to_string_pretty(&versions)?.as_bytes())?; | 94 | file.write_all(serde_json::to_string_pretty(&versions)?.as_bytes())?; |
@@ -121,8 +119,6 @@ impl VersionLevel { | |||
121 | 119 | ||
122 | /// . | 120 | /// . |
123 | /// | 121 | /// |
124 | /// # Panics | ||
125 | /// | ||
126 | /// Panics if . | 122 | /// Panics if . |
127 | /// # Errors | 123 | /// # Errors |
128 | pub async fn get( | 124 | pub async fn get( |