Skip to content

Commit

Permalink
🔀 Merge pull request #103 from rster2002/codex-entry-reexports
Browse files Browse the repository at this point in the history
Fix missing reexports for guardian codex entries
  • Loading branch information
rster2002 authored Nov 16, 2024
2 parents 114762e + fd5a945 commit bf25441
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/modules/exploration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/modules/exploration/models/codex_guardian_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),

Expand All @@ -48,11 +48,11 @@ pub enum CodexGuardianEntryError {
}

impl FromStr for CodexGuardianEntry {
type Err = CodexGuardianEntryError;
type Err = CodexGuardianError;

fn from_str(s: &str) -> Result<Self, Self::Err> {
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
Expand Down Expand Up @@ -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())),
})
}
}
Expand Down

0 comments on commit bf25441

Please sign in to comment.