Refactor frame to have desired semantics

This commit is contained in:
Josh Mitchell
2020-11-10 20:38:24 +11:00
committed by daniel
parent d559f9e6df
commit 734048d572
6 changed files with 36 additions and 53 deletions

View File

@@ -8,7 +8,7 @@ mod integration {
fn test_use_library() -> Result<()> {
let mut trj = XTCTrajectory::open_read("tests/1l2y.xtc")?;
let num_atoms = trj.get_num_atoms()?;
let mut frame = Frame::with_capacity(num_atoms);
let mut frame = Frame::with_len(num_atoms as usize);
trj.read(&mut frame)?;
trj.read(&mut frame)?;