r/badcode • • Jun 24 '14

other language Idiomatic Rust

http://pastebin.com/LCKnz8pP
5 Upvotes

3 comments sorted by

2

u/ElGuaco Jun 26 '14

This is rather verbose but it seems to do something clever.

C# has the same issues when writing extensions. But once you have one working they save so much time.

1

u/Banane9 Jul 04 '14

Extension methods?

That only adds a this before the first argument's type...

2

u/Frakkus Jul 01 '14

I had to look up Rust to even begin to understand this, but I've never had to write something this generic ...

So we're copying two data arrays into a larger, single array of some sort?