Remove iflet by mapping
This commit is contained in:
parent
944a9bf876
commit
a26a0645bd
1 changed files with 3 additions and 5 deletions
|
@ -1083,11 +1083,9 @@ fn verify_header(t: &Table) -> Result<()> {
|
|||
}
|
||||
|
||||
fn verify_header_consistency(t: Table) -> EntryResult<Table> {
|
||||
if let Err(e) = verify_header(&t) {
|
||||
Err(ParserError::new(ParserErrorKind::HeaderInconsistency, Some(Box::new(e))))
|
||||
} else {
|
||||
Ok(t)
|
||||
}
|
||||
verify_header(&t)
|
||||
.map_err(|e| ParserError::new(ParserErrorKind::HeaderInconsistency, Some(Box::new(e))))
|
||||
.map(|_| t)
|
||||
}
|
||||
|
||||
fn has_only_tables(t: &Table) -> bool {
|
||||
|
|
Loading…
Reference in a new issue