Skip to content

Commit

Permalink
Changed guessing of serialization to first try functional parser as t…
Browse files Browse the repository at this point in the history
…hey don't panic.
  • Loading branch information
b-gehrke committed Jun 7, 2024
1 parent 8a76107 commit f6088df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ fn open_ontology_from_string(ontology: String, serialization: Option<&str>) -> P
Some(ResourceType::OFN) => open_ontology_ofn(&mut f, &b),
Some(ResourceType::OWX) => open_ontology_owx(&mut f, &b),
Some(ResourceType::RDF) => open_ontology_rdf(&mut f, &b),
None => open_ontology_rdf(&mut f, &b)
.or_else(|_| open_ontology_ofn(&mut f, &b))
None => open_ontology_ofn(&mut f, &b)
.or_else(|_| open_ontology_rdf(&mut f, &b))
.or_else(|_| open_ontology_owx(&mut f, &b))
}.map_err(to_py_err!("Failed to open ontology"))?;

Expand Down

0 comments on commit f6088df

Please sign in to comment.