this post was submitted on 30 Sep 2024
26 points (100.0% liked)

Rust

5981 readers
54 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

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
 

Last week I basically duplicated the serialization code to provide better debug output.... today, I see this pass in my Mastodon feed. 😀 Well... what are the odds... most likely close to 100% according to how the universe seems to operate.

top 4 comments
sorted by: hot top controversial new old
[–] BB_C@programming.dev 4 points 1 month ago (1 children)

Last week I basically duplicated the serialization code to provide better debug output…

Why was duplication needed, instead of implementing Debug using serialized output?

And why would one want to rename stuff...etc in Debug anyway? It's for debugging?

This looks like purpose mismatch to me.

[–] snaggen@programming.dev 2 points 1 month ago (1 children)

I wanted to use the debug fmt functions, to allow for pretty debug also.

[–] BB_C@programming.dev 3 points 1 month ago (1 children)

I just looked at the code, and it's actually a neat idea implementation wise, and I see now how it helped you.

But I'm still of the opinion that its a purpose mismatch.

[–] GetOffMyLan@programming.dev 1 points 1 month ago

Yeah tagging things for debug purposes feels odd