I’m a Rust noob, and I may have just stumbled into something easy to fix that, as a noob, I just can’t fix so far.
Well, I’ve got a function mapping an array, nothing weird. For debugging purposes it prints the array before returning it.
You can find it here: https://github.com/yobicash/libyobicash/blob/testing/src/models/outpoint/mod.rs#L101
Then there is this test, where the printed, existing array, get returned empty, and printed empty. What’s even stranger, is that it seems that the various prints get executed disorderly.
You can find the code here: https://github.com/yobicash/libyobicash/blob/testing/tests/models/tx/mod.rs#L471
It’s rustup v1.5.0, rustc v1.18.0, cargo v0.19.0. Just cargo test – --nocapture.
So, noob question: does Rust have some sort of asynchronicity in synchronous code?