15
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 06 Sep 2023
15 points (100.0% liked)
Rust
5966 readers
31 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
I like to write them in blocks of concerns: ie there should be the minimum amount of jumping around the file when reading them. If there are a lot of these separate blocks in a single file, that is a good indication that it has grown enough and it is time to separate them into different files. But inside the blocks it would be usually struct/enums (no implicit order since they are just sum/product types), impl blocks, free functions (that are usually common functionality between the impl blocks).