reverted to single ReadNAtom error type

This commit is contained in:
daniel
2020-11-12 09:59:59 +01:00
parent 90c4c73887
commit 80b6cafc66
3 changed files with 8 additions and 13 deletions

View File

@@ -218,7 +218,7 @@ impl Trajectory for XTCTrajectory {
let num_atoms =
self.get_num_atoms()
.map_err(|e| Error::CheckNAtomsDuringRead(Box::new(e)))? as usize;
.map_err(|e| Error::CouldNotCheckNAtoms(Box::new(e)))? as usize;
if num_atoms != frame.coords.len() {
Err((&*frame, num_atoms))?;
}
@@ -337,7 +337,7 @@ impl Trajectory for TRRTrajectory {
let num_atoms =
self.get_num_atoms()
.map_err(|e| Error::CheckNAtomsDuringRead(Box::new(e)))? as usize;
.map_err(|e| Error::CouldNotCheckNAtoms(Box::new(e)))? as usize;
if num_atoms != frame.coords.len() {
Err((&*frame, num_atoms))?;
}