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> {
|
fn verify_header_consistency(t: Table) -> EntryResult<Table> {
|
||||||
if let Err(e) = verify_header(&t) {
|
verify_header(&t)
|
||||||
Err(ParserError::new(ParserErrorKind::HeaderInconsistency, Some(Box::new(e))))
|
.map_err(|e| ParserError::new(ParserErrorKind::HeaderInconsistency, Some(Box::new(e))))
|
||||||
} else {
|
.map(|_| t)
|
||||||
Ok(t)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn has_only_tables(t: &Table) -> bool {
|
fn has_only_tables(t: &Table) -> bool {
|
||||||
|
|
Loading…
Reference in a new issue