Skip to content

Commit a21b17c

Browse files
committed
Small fix in mmCIF files parsing
1 parent c326905 commit a21b17c

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/read/mmcif/parser.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -558,22 +558,15 @@ fn parse_atoms(input: &Loop, pdb: &mut PDB) -> Option<Vec<PDBError>> {
558558
/// Get the Textual content of the value, if available
559559
fn get_text(
560560
value: &Value,
561-
context: &Context,
562-
column: Option<&str>,
561+
_context: &Context,
562+
_column: Option<&str>,
563563
) -> Result<Option<String>, PDBError> {
564564
match value {
565565
Value::Text(t) => Ok(Some(t.to_string())),
566566
Value::Inapplicable => Ok(None),
567567
Value::Unknown => Ok(None),
568568
Value::Numeric(n) => Ok(Some(format!("{n}"))),
569-
_ => Err(PDBError::new(
570-
ErrorLevel::InvalidatingError,
571-
"Not text",
572-
column.map_or(String::new(), |v| {
573-
format!("The '{v}' column should contain text.")
574-
}),
575-
context.clone(),
576-
)),
569+
Value::NumericWithUncertainty(n, u) => Ok(Some(format!("{n}({u})"))),
577570
}
578571
}
579572

0 commit comments

Comments
 (0)