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.
Long where clause in impl, pushed left by some naivety in Rust’s associated type lookup:
Long for-loop iterator expression:
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.