Closed Fraser999 closed 8 years ago
r? @maqi
(maidsafe_highfive has picked a reviewer for you, use r? to override)
r? @ustulation
r? @dirvine
Reviewed 3 of 12 files at r1, 2 of 4 files at r2, 1 of 1 files at r3. Review status: 5 of 12 files reviewed at latest revision, 1 unresolved discussion.
_src/data_map.rs, line 44 [r3] (raw file):_
let mut ret = String::new(); for byte in input_ref.iter() { write!(ret, "{:02x}", byte).expect("");
Can you please put descriptive text in expect
calls, Just helps debug / error reporting
_Comments from Reviewable_
Reviewed 5 of 12 files at r1, 2 of 4 files at r2. Review status: all files reviewed at latest revision, 1 unresolved discussion.
_Comments from Reviewable_
Review status: all files reviewed at latest revision, 1 unresolved discussion.
_src/data_map.rs, line 44 [r3] (raw file):_
Do you want unique messages, or can I duplicate all for a given function e.g. all
write()
s becomewrite(...).expect("Should have written")
?
_Comments from Reviewable_
Review status: all files reviewed at latest revision, 1 unresolved discussion.
_src/data_map.rs, line 44 [r3] (raw file):_
As unique as possible as these will print out on failure. So an indication of where it is, like "shoudl have written in seq" etc.
_Comments from Reviewable_
Review status: all files reviewed at latest revision, 1 unresolved discussion.
_src/data_map.rs, line 44 [r3] (raw file):_
OK. This will take me a wee while, since there are 163 occurrences (all in tests/examples/benchmarks except this debug printout one which can't fire anyway).
_Comments from Reviewable_
Review status: all files reviewed at latest revision, 1 unresolved discussion.
_src/data_map.rs, line 44 [r3] (raw file):_
In tests that should be small then use
unwrap()
if it simpler (unit tests only I would say - so small simple tests where this is called only once), the [point is these being blank is then they are justunwrap()
filled in with unique string will tell where they failed.
_Comments from Reviewable_
Reviewed 5 of 12 files at r1, 1 of 4 files at r2, 7 of 7 files at r4. Review status: all files reviewed at latest revision, 1 unresolved discussion.
_Comments from Reviewable_
Reviewed 1 of 4 files at r2, 7 of 7 files at r4. Review status: all files reviewed at latest revision, 1 unresolved discussion.
_Comments from Reviewable_
This changes all the public functions which can have errors to return
Result
s. Also improved documentation and removed two unneeded tests.For the reviewer: I split the changes into two commits to make the review easier. The first commit only contains the changes around splitting lib.rs up - there were no logic changes there at all. So, really only the second commit is interesting from a reviewer's perspective I think.
This change is