ngn@lemy.lol to Programmer Humor@lemmy.mlEnglish · 6 months agogot himlemy.lolimagemessage-square28fedilinkarrow-up18arrow-down10
arrow-up18arrow-down1imagegot himlemy.lolngn@lemy.lol to Programmer Humor@lemmy.mlEnglish · 6 months agomessage-square28fedilink
minus-squareRustyNova@lemmy.worldlinkfedilinkarrow-up0·6 months agoIt’s a lot less readable imo. As well than a cargo fmt later and it’s gone (unless there’s a nightly setting for it)
minus-squareDoods@infosec.publinkfedilinkarrow-up0arrow-down1·6 months agoFormatters are off-topic for this, styles come first, formatters are developed later. My other reply: How about this one? it more closely mirrors the switch example: match suffix { 'G' | 'g' => mem -= 30, 'M' | 'm' => mem -= 20, 'K' | 'k' => mem -= 10, _ => {}, } How about this other one? it goes as far as cloning the switch example’s indentation: match suffix { 'G' | 'g' => { mem -= 30; } 'M' | 'm' => { mem -= 20; } 'K' | 'k' => { mem -= 10; } _ => {}, }
It’s a lot less readable imo. As well than a
cargo fmt
later and it’s gone (unless there’s a nightly setting for it)Formatters are off-topic for this, styles come first, formatters are developed later.
My other reply: