Stebalien / tempfile

Temporary file library for rust
http://stebalien.com/projects/tempfile-rs
Apache License 2.0
1.2k stars 120 forks source link

Derive Serde + Standard traits + Implement `Display` #238

Closed blyxyas closed 1 year ago

blyxyas commented 1 year ago

The Rust API Guidelines recommend deriving / implementing the following traits C-COMMON-TRAITS:

Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Display, Default

Debug is already implemented and Display and Copy aren't derivable in this case. So this PR derives all remaining traits, and implements Display for TempDir.


It also adds a "serde" feature (C-SERDE), if it's enabled, Serde's Serialize and Deserialize are also derived.

Stebalien commented 1 year ago

None of these implementations make sense.

blyxyas commented 1 year ago

I want to implement this for a custom type for my library, and also I want my library to use the Rust API Guidelines, that's why I made this PR. That's kinda rude tbh

Stebalien commented 1 year ago

I apologize for being short. PRs like this can get repetitive and frustrating, but I understand you were just trying to help so I'll give you a bit of context

First, PR review takes time. When you submit a PR for a new feature, you're not doing the maintainer a favor, you're asking for a favor; unless they requested the feature, you likely want it more than they do. This means the onus is on you to do as much work as possible up-front to avoid wasting their time.

The core issue with this PR is that it lacks any real motivation or forethought. A motivation both gives the reviewer context and forces you to think understand/think about the feature you're implementing.

In this specific case:

blyxyas commented 1 year ago

you're not doing the maintainer a favor, you're asking for a favor

Oh I'm very sorry for taking time out of my day, thinking that adding some more traits could be helpful. Forking your repo, implementing the change and opening a Pull Request explaining the changes. Ignorant me!

I'm sorry! Thanks for the favor of saying "None of this implementations makes sense" and closing it without any further explanation until I point that out!

avoid wasting their time.

The change is made of a one-liner and a feature in Cargo.toml. Omg such a waste of time! Thanks for being so kind to let me ask for this favor! So that you could just be rude and close it instantly, without an explanation!

I'll just leave the Rust Code Of Conduct here.