• Ravn
    link
    fedilink
    arrow-up
    3
    ·
    3 years ago

    I frequently produce such “lines” in […] Rust with the list/iterator operations.

    Use method chaining and rustfmt.

    • Ephera
      link
      fedilink
      arrow-up
      4
      ·
      3 years ago

      I put those quotes there, because I don’t actually write them into one line. That Java code sample seems to just have done so unnecessarily.

      So, while I don’t use rustfmt, I do probably format it the way it would format that.