mirror of
https://github.com/dnlbauer/xdrfile.git
synced 2026-09-11 06:35:30 +00:00
reverted to single ReadNAtom error type
This commit is contained in:
@@ -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))?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user