My attempt for idiomatic Rust, which can admittedly make the code a bit verbose sometimes. The goal isn't to write a concise code though but more about exercise and usage of Rust's powerful traits.
I'll try and take advantage of those Rust programming patterns as I see fit during the daily challenges. Challenges with concerete patterns are listed below here.
- sonar-sweep - extension trait that adds a
moving_sum
method to an iterator - dive -
FromStr
trait example - binary-diagnostic - todo!()
- giant-squid - again
FromStr
+Display
trait implemntations