[PR #304] [MERGED] Implement some Clippy fixes #1358

Closed
opened 2026-03-16 02:02:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/304
Author: @daniellockyer
Created: 11/30/2017
Status: Merged
Merged: 12/2/2017
Merged by: @bluejekyll

Base: masterHead: clippy-fixes


📝 Commits (10+)

  • 48c8315 Remove unused import
  • b74ba06 Use the _or_with/_or_else variant with closures
  • 8da3737 Avoid taking reference by referencing RHS
  • 7ffd607 Stop taking reference if not needed
  • 4a1110e Use value instead of creating closure
  • 4cba6de Add underscores for long literals
  • 52f632d Remove unnecessary return keyword
  • 1ed6b11 Remove lifetimes as unneeded
  • 61e3b08 Simplify match argument
  • c722902 Remove some .clone calls

📊 Changes

17 files changed (+139 additions, -83 deletions)

View changed files

📝 proto/src/dns_handle.rs (+0 -1)
📝 scripts/run_clippy.sh (+63 -0)
📝 server/benches/comparison_benches.rs (+5 -5)
📝 server/src/authority/authority.rs (+26 -34)
📝 server/src/authority/catalog.rs (+2 -2)
📝 server/src/authority/persistence.rs (+2 -2)
📝 server/src/config.rs (+9 -7)
📝 server/src/logger.rs (+2 -2)
📝 server/src/named.rs (+10 -9)
📝 server/src/server/server_future.rs (+1 -2)
📝 server/src/server/timeout_stream.rs (+3 -3)
📝 server/tests/config_tests.rs (+1 -1)
📝 server/tests/server_harness/mod.rs (+8 -8)
📝 server/tests/txt_tests.rs (+2 -2)
📝 server/tests/z_named_native_tls_tests.rs (+2 -2)
📝 server/tests/z_named_test_rsa_dnssec.rs (+2 -2)
📝 server/tests/z_named_tests.rs (+1 -1)

📄 Description

WIP: Don't merge, more changes incoming...

I ran using cargo clippy -- --allow doc_markdown --allow type_complexity --allow module_inception --allow new_ret_no_self.

Let me know if anything goes against personal style.

I could also modify run_clippy.sh to add more crates.


🔄 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/304 **Author:** [@daniellockyer](https://github.com/daniellockyer) **Created:** 11/30/2017 **Status:** ✅ Merged **Merged:** 12/2/2017 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `master` ← **Head:** `clippy-fixes` --- ### 📝 Commits (10+) - [`48c8315`](https://github.com/hickory-dns/hickory-dns/commit/48c831593a6bdc0053663e475ec2199403492207) Remove unused import - [`b74ba06`](https://github.com/hickory-dns/hickory-dns/commit/b74ba06b0c9f8ad50ae9c854d66f5846d82753ac) Use the *_or_with/*_or_else variant with closures - [`8da3737`](https://github.com/hickory-dns/hickory-dns/commit/8da3737ef33bd3ae011c40ac25ea148f9bf3dfd7) Avoid taking reference by referencing RHS - [`7ffd607`](https://github.com/hickory-dns/hickory-dns/commit/7ffd6078fbdaca0dd96908432a160ee8ad75e590) Stop taking reference if not needed - [`4a1110e`](https://github.com/hickory-dns/hickory-dns/commit/4a1110e9d37cda8d329e337b5369da86ef45c68a) Use value instead of creating closure - [`4cba6de`](https://github.com/hickory-dns/hickory-dns/commit/4cba6de79abc8272618b52bd91a7f18f9b1826a3) Add underscores for long literals - [`52f632d`](https://github.com/hickory-dns/hickory-dns/commit/52f632dc569d28958f7431ed7e144166f3dacc0f) Remove unnecessary return keyword - [`1ed6b11`](https://github.com/hickory-dns/hickory-dns/commit/1ed6b11beaf5dd9488442d8248586c783a48f6ef) Remove lifetimes as unneeded - [`61e3b08`](https://github.com/hickory-dns/hickory-dns/commit/61e3b08ed7f8dbd1e6636b71d74c1f668cdc9d84) Simplify match argument - [`c722902`](https://github.com/hickory-dns/hickory-dns/commit/c7229022afa722b776934e0712988084fc9709b2) Remove some .clone calls ### 📊 Changes **17 files changed** (+139 additions, -83 deletions) <details> <summary>View changed files</summary> 📝 `proto/src/dns_handle.rs` (+0 -1) 📝 `scripts/run_clippy.sh` (+63 -0) 📝 `server/benches/comparison_benches.rs` (+5 -5) 📝 `server/src/authority/authority.rs` (+26 -34) 📝 `server/src/authority/catalog.rs` (+2 -2) 📝 `server/src/authority/persistence.rs` (+2 -2) 📝 `server/src/config.rs` (+9 -7) 📝 `server/src/logger.rs` (+2 -2) 📝 `server/src/named.rs` (+10 -9) 📝 `server/src/server/server_future.rs` (+1 -2) 📝 `server/src/server/timeout_stream.rs` (+3 -3) 📝 `server/tests/config_tests.rs` (+1 -1) 📝 `server/tests/server_harness/mod.rs` (+8 -8) 📝 `server/tests/txt_tests.rs` (+2 -2) 📝 `server/tests/z_named_native_tls_tests.rs` (+2 -2) 📝 `server/tests/z_named_test_rsa_dnssec.rs` (+2 -2) 📝 `server/tests/z_named_tests.rs` (+1 -1) </details> ### 📄 Description **WIP: Don't merge, more changes incoming...** I ran using `cargo clippy -- --allow doc_markdown --allow type_complexity --allow module_inception --allow new_ret_no_self`. Let me know if anything goes against personal style. I could also modify `run_clippy.sh` to add more crates. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:02:09 +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#1358
No description provided.