Commit Graph

67 Commits

Author SHA1 Message Date
Josh Mitchell
4a71ed001c New NumAtomsOutOfRange error variant 2020-11-15 17:39:22 +11:00
Josh Mitchell
9a4f27aeb7 Removed pointer casts from lib.rs 2020-11-15 17:21:49 +11:00
Josh Mitchell
7acde7f7de Use c_int and c_float behind closed doors rather than i32/f32 2020-11-15 17:13:46 +11:00
Josh Mitchell
8f310f3fe7 Added from type info to cast errors 2020-11-15 16:54:42 +11:00
Josh Mitchell
8f34cdfcdf no more BindgenTy1 2020-11-15 16:48:52 +11:00
Josh Mitchell
ecccd6aca4 Fix a few casts after rebase 2020-11-14 13:06:53 +11:00
Josh Mitchell
1192188cb0 Test for to_i32 2020-11-14 13:02:19 +11:00
Josh Mitchell
58719dad5d Removed all fallible casts (except in tests) 2020-11-14 13:02:19 +11:00
Daniel Bauer
b0875b60a5 Merge pull request #6 from Yoshanuikabundi/frame-semantics
Frame semantics
2020-11-13 12:47:17 +01:00
daniel
bbc0250af4 frame semantics for seek/tell and benchs 2020-11-13 12:42:04 +01:00
Josh Mitchell
3c36d3040e Removed trivial casts and changed frame.step to usize 2020-11-13 12:37:23 +01:00
Josh Mitchell
734048d572 Refactor frame to have desired semantics 2020-11-13 12:37:23 +01:00
daniel
d559f9e6df disable default libtest bench 2020-11-13 12:33:09 +01:00
daniel
d2fff6cd85 iterator benchmarks 2020-11-13 12:28:40 +01:00
Daniel Bauer
e7ad99c061 Merge pull request #5 from Yoshanuikabundi/xdr-seek
XDR seek
2020-11-13 10:06:56 +01:00
daniel
dde60bff5c move imports out of functions 2020-11-12 15:45:27 +01:00
Josh Mitchell
d784be8be5 Improved seek errors and implemented for TRR and XTC 2020-11-12 15:38:57 +01:00
Josh Mitchell
95de96aa5b Implement std::io::Seek for XDRFile with unit tests 2020-11-12 15:38:57 +01:00
Daniel Bauer
a8c88caf34 Merge pull request #3 from Yoshanuikabundi/rusty-error-codes
Rusty error codes
2020-11-12 10:25:41 +01:00
daniel
80b6cafc66 reverted to single ReadNAtom error type 2020-11-12 09:59:59 +01:00
Josh Mitchell
90c4c73887 Used cached result of self.trajectory.get_num_atoms() rather than storing it in TrajectoryIterator 2020-11-11 19:19:44 +11:00
Josh Mitchell
53dd997129 Broke out next_inner 2020-11-11 17:11:55 +11:00
Josh Mitchell
6d911fae0b Clearer errors if get_num_atoms fails during into_iter 2020-11-11 16:40:37 +11:00
daniel
0d887fc515 tests 2020-11-10 17:46:11 +01:00
daniel
7a22031bee move check_code to lib 2020-11-10 17:22:43 +01:00
daniel
56a15b7a41 code cleanup 2020-11-10 17:02:34 +01:00
Josh Mitchell
7ee04620f6 Error::task() now checks sources 2020-11-10 20:11:15 +11:00
Josh Mitchell
323ba0b88c Clarified error message when read_num_atoms() fails during read() 2020-11-10 19:49:58 +11:00
Josh Mitchell
85b106f5d8 Returned Error to being an enum, as other fields were unused 2020-11-10 19:34:58 +11:00
Josh Mitchell
ce16b20b67 Slightly clearer docs 2020-11-10 18:52:16 +11:00
Josh Mitchell
51635f2583 Restricted ErrorTask to only being relevant to C API errors 2020-11-10 18:50:14 +11:00
Josh Mitchell
420af8b369 Reduced role of ErrorTask to simplify errors 2020-11-10 18:17:23 +11:00
Josh Mitchell
4a99b4e0b0 Cleaned up errors a bit 2020-11-10 17:51:41 +11:00
Josh Mitchell
65294abee8 Replaced frame resizing with a simple check 2020-11-10 17:41:11 +11:00
Josh Mitchell
1fbce21ff6 Corrected undefined behaviour when calling Trajectory.read() on improperly sized Frame 2020-11-10 00:59:10 +11:00
Josh Mitchell
d1b69d3fd4 Treat ToCString differently in Display based on whether it has a source 2020-11-09 22:42:50 +11:00
Josh Mitchell
9ac3c959d9 Added ToCString variant to Error.source() 2020-11-09 22:40:37 +11:00
Josh Mitchell
f757072523 Added documentation to the errors module 2020-11-09 22:14:16 +11:00
Josh Mitchell
95b1bdba57 Streamlined error generation 2020-11-09 22:12:07 +11:00
Josh Mitchell
36a722e721 Refactored ErrorCode as Error.source() 2020-11-09 22:06:03 +11:00
Josh Mitchell
18436aaaa3 Nicer error messages 2020-11-09 22:04:23 +11:00
Josh Mitchell
4ca96364b9 Made error construction methods pub(crate) 2020-11-09 22:03:00 +11:00
Josh Mitchell
55fa21d45c Broke out errors module and handle error codes as rust enum 2020-11-09 21:58:39 +11:00
Daniel Bauer
75bd0c9437 Merge pull request #4 from Yoshanuikabundi/no-unwrap
Removed unwrap()s, refactored iterator, removed memleak
2020-11-09 08:37:37 +01:00
Josh Mitchell
fc35777aa0 Unit tests for Error::is_eof() 2020-11-09 18:15:56 +11:00
Josh Mitchell
e95fea3bfc Unit test for path_to_cstring() 2020-11-09 17:33:03 +11:00
Josh Mitchell
f9cf479baf Removed unwrap()s, refactored iterator, removed memleak 2020-11-09 17:20:46 +11:00
Daniel Bauer
05b309e4bd Update README.md 2020-11-08 11:25:36 +01:00
Daniel Bauer
e19f7efd73 Update README.md 2020-11-08 11:22:21 +01:00
daniel
e07d71beb6 travis 2020-11-08 11:16:00 +01:00