From fd5a945c870bae0ea906101e80c8646a029d5df6 Mon Sep 17 00:00:00 2001 From: rster2002 Date: Sat, 16 Nov 2024 13:27:43 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20missing=20reexports=20for?= =?UTF-8?q?=20guardian=20codex=20entries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/exploration/mod.rs | 2 ++ src/modules/exploration/models/codex_guardian_entry.rs | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/exploration/mod.rs b/src/modules/exploration/mod.rs index 4e6c787a..4e1f5a84 100644 --- a/src/modules/exploration/mod.rs +++ b/src/modules/exploration/mod.rs @@ -5,6 +5,8 @@ pub use models::codex_entry::CodexEntry; pub use models::codex_entry::CodexEntryError; pub use models::codex_geological_entry::CodexGeologicalEntry; pub use models::codex_geological_entry::CodexGeologicalError; +pub use models::codex_guardian_entry::CodexGuardianEntry; +pub use models::codex_guardian_entry::CodexGuardianError; pub use models::codex_organic_structure_entry::CodexOrganicStructureEntry; pub use models::codex_organic_structure_entry::CodexOrganicStructureError; pub use models::codex_planet_entry::CodexPlanetEntry; diff --git a/src/modules/exploration/models/codex_guardian_entry.rs b/src/modules/exploration/models/codex_guardian_entry.rs index 46f2617a..3e24795c 100644 --- a/src/modules/exploration/models/codex_guardian_entry.rs +++ b/src/modules/exploration/models/codex_guardian_entry.rs @@ -39,7 +39,7 @@ impl CodexGuardianEntry { } #[derive(Debug, Error)] -pub enum CodexGuardianEntryError { +pub enum CodexGuardianError { #[error("Failed to parse guardian codex entry: '{0}'")] FailedToParse(String), @@ -48,11 +48,11 @@ pub enum CodexGuardianEntryError { } impl FromStr for CodexGuardianEntry { - type Err = CodexGuardianEntryError; + type Err = CodexGuardianError; fn from_str(s: &str) -> Result { let Some(captures) = CODEX_REGEX.captures(s) else { - return Err(CodexGuardianEntryError::FailedToParse(s.to_string())); + return Err(CodexGuardianError::FailedToParse(s.to_string())); }; let string: &str = &captures @@ -83,7 +83,7 @@ impl FromStr for CodexGuardianEntry { _ => CodexGuardianEntry::Unknown(string.to_string()), #[cfg(not(feature = "allow-unknown"))] - _ => return Err(CodexGuardianEntryError::UnknownEntry(string.to_string())), + _ => return Err(CodexGuardianError::UnknownEntry(string.to_string())), }) } }