I agree with you. Perhaps somewhere combinators can make the code more readable, but not in this case. Although it looks funny. I would rather like to know if this negatively affects the memory used or other technical aspects?
No, not in general. Performance depends on what operations you perform, whether chained like this or not.
Yep, I saw a discourse in the "internals" about adding Vec::sorted()
into std. People mention inefficient itertools.sorted, which consumes iterator and reallocates the memory, if I understand they correctly.