Fix wrong latest version hardcoded

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/1/head
trivernis 3 years ago
parent 1bccbeeb33
commit cc69c314df
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,6 +1,6 @@
[package]
name = "minecraft-data-rs"
version = "0.4.0"
version = "0.4.1"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
readme = "README.md"

@ -26,13 +26,13 @@ pub fn versions_by_minecraft_version() -> DataResult<HashMap<String, Version>> {
/// Returns the latest stable version (hardcoded at the moment)
pub fn latest_stable() -> DataResult<Version> {
versions_by_minecraft_version()?
.get("1.16.5")
.get("1.18.1")
.cloned()
.ok_or(DataError::NotFoundError("1.16.5".to_string()))
.ok_or(DataError::NotFoundError("1.18.1".to_string()))
}
/// Returns a list of available version information
pub(crate) fn available_versions() -> DataResult<Vec<String>> {
pub fn available_versions() -> DataResult<Vec<String>> {
let content = get_common_file(VERSIONS_FILE)?;
serde_json::from_str::<Vec<String>>(&*content).map_err(DataError::from)
}

Loading…
Cancel
Save