Skip to content

Commit f7ff15d

Browse files
authored
Refactor description retrieval for achievements
Use get method for description lookup with fallback.
1 parent 6882b43 commit f7ff15d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/update/dimbreath/gi/texts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub async fn update(configs: &Configs, pool: &PgPool) -> anyhow::Result<()> {
8383
}
8484

8585
let name = text_map.get(&achievement.name.to_string()).cloned().unwrap_or_else(|| "Unknown".to_string());
86-
let mut description = text_map[&achievement.description.to_string()].clone();
86+
let mut description = text_map.get(&achievement.description.to_string()).cloned().unwrap_or_else(|| "Unknown".to_string());
8787

8888
if description.contains("{param0}") {
8989
description = description.replace("{param0}", &achievement.progress.to_string());

0 commit comments

Comments
 (0)