[PR #312] [CLOSED] Introduce a Label type instead of using Rc<String> #1361

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

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/312
Author: @little-dude
Created: 12/11/2017
Status: Closed

Base: masterHead: label


📝 Commits (3)

  • 99d0194 introduce a Label type that wraps Rc
  • ad0dd37 help rustc with array to slice coercion
  • 98adadd fixup

📊 Changes

25 files changed (+276 additions, -212 deletions)

View changed files

📝 compatibility-tests/tests/sig0_tests.rs (+3 -3)
📝 integration-tests/tests/authority_tests.rs (+9 -9)
📝 integration-tests/tests/client_future_tests.rs (+15 -15)
📝 integration-tests/tests/client_tests.rs (+15 -15)
📝 integration-tests/tests/secure_client_handle_tests.rs (+3 -3)
📝 integration-tests/tests/server_future_tests.rs (+1 -1)
📝 proto/src/op/query.rs (+1 -1)
📝 proto/src/rr/dnssec/nsec3.rs (+1 -1)
📝 proto/src/rr/dnssec/rdata/nsec.rs (+1 -1)
📝 proto/src/rr/dnssec/rdata/sig.rs (+1 -1)
📝 proto/src/rr/dnssec/tbs.rs (+1 -1)
📝 proto/src/rr/domain.rs (+156 -96)
📝 proto/src/rr/rdata/mx.rs (+1 -1)
📝 proto/src/rr/rdata/name.rs (+1 -1)
📝 proto/src/rr/rdata/soa.rs (+2 -2)
📝 proto/src/rr/rdata/srv.rs (+1 -1)
📝 proto/src/rr/record_data.rs (+21 -21)
📝 proto/src/serialize/binary/encoder.rs (+4 -4)
📝 proto/src/serialize/binary/mod.rs (+2 -0)
📝 proto/src/serialize/mod.rs (+2 -0)

...and 5 more files

📄 Description

I was looking again at https://github.com/bluejekyll/trust-dns/pull/305, and realized that I wanted to take a slice of Name. I started adding Name.as_slice(), but then thought it was not very nice to have to manipulate Rc<String>, so I decided to add a Label type.

4ac7e37 is a bit unfortunate, but in theory, we could get rif of it later.


🔄 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/312 **Author:** [@little-dude](https://github.com/little-dude) **Created:** 12/11/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `label` --- ### 📝 Commits (3) - [`99d0194`](https://github.com/hickory-dns/hickory-dns/commit/99d01948a8159c630faf38382ff9a658e62a8abd) introduce a Label type that wraps Rc<String> - [`ad0dd37`](https://github.com/hickory-dns/hickory-dns/commit/ad0dd377a8e67dd6554aa5092d3042fa24843d59) help rustc with array to slice coercion - [`98adadd`](https://github.com/hickory-dns/hickory-dns/commit/98adadd2d551cba7094d491853aa6ad2e9b21ca6) fixup ### 📊 Changes **25 files changed** (+276 additions, -212 deletions) <details> <summary>View changed files</summary> 📝 `compatibility-tests/tests/sig0_tests.rs` (+3 -3) 📝 `integration-tests/tests/authority_tests.rs` (+9 -9) 📝 `integration-tests/tests/client_future_tests.rs` (+15 -15) 📝 `integration-tests/tests/client_tests.rs` (+15 -15) 📝 `integration-tests/tests/secure_client_handle_tests.rs` (+3 -3) 📝 `integration-tests/tests/server_future_tests.rs` (+1 -1) 📝 `proto/src/op/query.rs` (+1 -1) 📝 `proto/src/rr/dnssec/nsec3.rs` (+1 -1) 📝 `proto/src/rr/dnssec/rdata/nsec.rs` (+1 -1) 📝 `proto/src/rr/dnssec/rdata/sig.rs` (+1 -1) 📝 `proto/src/rr/dnssec/tbs.rs` (+1 -1) 📝 `proto/src/rr/domain.rs` (+156 -96) 📝 `proto/src/rr/rdata/mx.rs` (+1 -1) 📝 `proto/src/rr/rdata/name.rs` (+1 -1) 📝 `proto/src/rr/rdata/soa.rs` (+2 -2) 📝 `proto/src/rr/rdata/srv.rs` (+1 -1) 📝 `proto/src/rr/record_data.rs` (+21 -21) 📝 `proto/src/serialize/binary/encoder.rs` (+4 -4) 📝 `proto/src/serialize/binary/mod.rs` (+2 -0) 📝 `proto/src/serialize/mod.rs` (+2 -0) _...and 5 more files_ </details> ### 📄 Description I was looking again at https://github.com/bluejekyll/trust-dns/pull/305, and realized that I wanted to take a slice of Name. I started adding `Name.as_slice()`, but then thought it was not very nice to have to manipulate `Rc<String>`, so I decided to add a `Label` type. 4ac7e37 is a bit unfortunate, but in theory, we could get rif of it later. --- <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:25 +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#1361
No description provided.