This Rust tutorial explains the fold() mechanism well, and this example code:
fold()
let sum = (1..4).fold(0, |sum, x| sum + x);
work
So it turned out there was a huge difference in my code, as I wrote
sum += x
instead of
sum + x.
sum + x
Well, at least I hope this question helps, in case someone gets into similar situation.