I usually have a good idea of how I like my code to look so I can parse it in the future, but sometimes I just hit a wall trying to figure out how to format some of the longest lines in my code to keep under the 100 column limit.
I know it's okay to go over sometimes (in the words of Captain Barbosa, "They're more like guidelines than actual rules...") but I don't like to because I think long solitary lines are ugly. However, I've been experimenting with some styles and I don't know which of them is less ugly than just fudging the column limit.
Here's some out-of-context snippets I've been most heavily tested while working on, from https://github.com/cybergeek94/multipart/tree/revival:
Long type and parameter lists in function
https://github.com/cybergeek94/multipart/blob/revival/src/client/mod.rs#L137
Long concrete parameter list in function
https://github.com/cybergeek94/multipart/blob/revival/src/client/mod.rs#L153
Long where
clause in impl
, pushed left by some naivety in Rust's associated type lookup:
https://github.com/cybergeek94/multipart/blob/revival/src/client/mod.rs#L183
Long for-loop iterator expression:
https://github.com/cybergeek94/multipart/blob/revival/src/server/boundary.rs#L39
I have read the Rust style guide but it's been a while and I haven't been able to find an up-to-date copy online. Last time I checked, it didn't really cover things like this. I assume they must be edge-cases.
I know the code is probably full of logic errors as well; I'm still working on it. It's an almost-total rewrite of an old project of mine.