fix CI lint

pull/10/head
firejoust 2 years ago
parent 1ae46eb09a
commit 7ce26821e9

@ -20,7 +20,7 @@ impl Enchantments {
pub fn enchantments_array(&self) -> DataResult<Vec<Enchantment>> {
let content = get_version_specific_file(&self.version, ENCHANTMENTS_FILE)?;
serde_json::from_str::<Vec<Enchantment>>(&*content).map_err(DataError::from)
serde_json::from_str::<Vec<Enchantment>>(&content).map_err(DataError::from)
}
/// Returns a map of enchantments indexed by ID

@ -19,7 +19,7 @@ impl Items {
pub fn items_array(&self) -> DataResult<Vec<Item>> {
let content = get_version_specific_file(&self.version, ITEMS_FILE)?;
serde_json::from_str::<Vec<Item>>(&*content).map_err(DataError::from)
serde_json::from_str::<Vec<Item>>(&content).map_err(DataError::from)
}
/// Returns the items indexed by name

@ -18,6 +18,6 @@ impl Recipes {
/// Returns a list of recipes indexed by item ID
pub fn recipes(&self) -> DataResult<HashMap<u32, Vec<Recipe>>> {
let content = get_version_specific_file(&self.version, RECIPES_FILE)?;
serde_json::from_str::<HashMap<u32, Vec<Recipe>>>(&*content).map_err(DataError::from)
serde_json::from_str::<HashMap<u32, Vec<Recipe>>>(&content).map_err(DataError::from)
}
}

@ -7,7 +7,7 @@ use std::collections::HashMap;
/// Returns the unsorted list of versions
pub fn versions() -> DataResult<Vec<Version>> {
let content = get_common_file(PROTOCOL_VERSIONS_FILE)?;
let versions = serde_json::from_str::<Vec<Version>>(&*content)?;
let versions = serde_json::from_str::<Vec<Version>>(&content)?;
Ok(versions)
}
@ -52,5 +52,5 @@ pub fn latest_stable() -> DataResult<Version> {
/// Returns a list of available version information
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)
serde_json::from_str::<Vec<String>>(&content).map_err(DataError::from)
}

Loading…
Cancel
Save