[PR #1633] [MERGED] Warn on default trait usage #2475

Closed
opened 2026-03-16 08:55:44 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1633
Author: @bluejekyll
Created: 2/13/2022
Status: Merged
Merged: 2/18/2022
Merged by: @bluejekyll

Base: mainHead: warn-on-default-trait-usage


📝 Commits (3)

  • 6b13dd9 Warn on default trait usage
  • d2d57f2 revert deprecation change on key, add allows where necessary
  • 8d7e7cb add clippy::use_self for cleanliness

📊 Changes

136 files changed (+885 additions, -863 deletions)

View changed files

📝 crates/async-std-resolver/src/lib.rs (+2 -0)
📝 crates/async-std-resolver/src/net.rs (+1 -1)
📝 crates/async-std-resolver/src/runtime.rs (+1 -1)
📝 crates/client/src/client/async_client.rs (+5 -5)
📝 crates/client/src/client/async_secure_client.rs (+2 -2)
📝 crates/client/src/client/client.rs (+3 -3)
📝 crates/client/src/client/client_connection.rs (+2 -2)
📝 crates/client/src/client/memoize_client_handle.rs (+2 -2)
📝 crates/client/src/client/rc_stream.rs (+1 -1)
📝 crates/client/src/error/client_error.rs (+8 -8)
📝 crates/client/src/error/dnssec_error.rs (+8 -8)
📝 crates/client/src/error/lexer_error.rs (+2 -2)
📝 crates/client/src/error/parse_error.rs (+13 -13)
📝 crates/client/src/lib.rs (+2 -0)
📝 crates/client/src/multicast/mdns_client_connection.rs (+2 -2)
📝 crates/client/src/op/lower_query.rs (+4 -4)
📝 crates/client/src/rr/dnssec/keypair.rs (+16 -15)
📝 crates/client/src/rr/dnssec/tsig.rs (+1 -1)
📝 crates/client/src/rr/lower_name.rs (+13 -13)
📝 crates/client/src/rr/rr_key.rs (+3 -3)

...and 80 more files

📄 Description

When looking for usage of types, Default::default makes it harder to track down. By denying this with the clippy lint, we will make maintenance a little easier across the project when trying to find all usage with simple text search.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/1633 **Author:** [@bluejekyll](https://github.com/bluejekyll) **Created:** 2/13/2022 **Status:** ✅ Merged **Merged:** 2/18/2022 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `warn-on-default-trait-usage` --- ### 📝 Commits (3) - [`6b13dd9`](https://github.com/hickory-dns/hickory-dns/commit/6b13dd9636cd4e2a31a94f5ac097dbf8701f4837) Warn on default trait usage - [`d2d57f2`](https://github.com/hickory-dns/hickory-dns/commit/d2d57f2b661e41b11df8b1ba041c3311b9f4d135) revert deprecation change on key, add allows where necessary - [`8d7e7cb`](https://github.com/hickory-dns/hickory-dns/commit/8d7e7cb1fe5567bd02f290bb07510fc9e162426a) add clippy::use_self for cleanliness ### 📊 Changes **136 files changed** (+885 additions, -863 deletions) <details> <summary>View changed files</summary> 📝 `crates/async-std-resolver/src/lib.rs` (+2 -0) 📝 `crates/async-std-resolver/src/net.rs` (+1 -1) 📝 `crates/async-std-resolver/src/runtime.rs` (+1 -1) 📝 `crates/client/src/client/async_client.rs` (+5 -5) 📝 `crates/client/src/client/async_secure_client.rs` (+2 -2) 📝 `crates/client/src/client/client.rs` (+3 -3) 📝 `crates/client/src/client/client_connection.rs` (+2 -2) 📝 `crates/client/src/client/memoize_client_handle.rs` (+2 -2) 📝 `crates/client/src/client/rc_stream.rs` (+1 -1) 📝 `crates/client/src/error/client_error.rs` (+8 -8) 📝 `crates/client/src/error/dnssec_error.rs` (+8 -8) 📝 `crates/client/src/error/lexer_error.rs` (+2 -2) 📝 `crates/client/src/error/parse_error.rs` (+13 -13) 📝 `crates/client/src/lib.rs` (+2 -0) 📝 `crates/client/src/multicast/mdns_client_connection.rs` (+2 -2) 📝 `crates/client/src/op/lower_query.rs` (+4 -4) 📝 `crates/client/src/rr/dnssec/keypair.rs` (+16 -15) 📝 `crates/client/src/rr/dnssec/tsig.rs` (+1 -1) 📝 `crates/client/src/rr/lower_name.rs` (+13 -13) 📝 `crates/client/src/rr/rr_key.rs` (+3 -3) _...and 80 more files_ </details> ### 📄 Description When looking for usage of types, `Default::default` makes it harder to track down. By denying this with the clippy lint, we will make maintenance a little easier across the project when trying to find all usage with simple text search. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 08:55:44 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2475
No description provided.