Comment

Comment by dystroy

Imagine you have a big enum in Rust, for example an Error, with a dozen or more variants.

When maintaining related code, for example a Display implementation, or routing to some behaviors, it's sometimes much easier when it's alpha sorted: you immediately see what's implemented or not.

That's when you can hit the codesort shortcut to have this specific list (enum variants, match arms, etc.) sorted.

parent dystroy 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton