[PR #1756] [MERGED] Cleanup lex #2575

Closed
opened 2026-03-16 10:28:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1756
Author: @darnuria
Created: 8/7/2022
Status: Merged
Merged: 8/7/2022
Merged by: @djc

Base: mainHead: cleanup-lex


📝 Commits (5)

  • 3a4d3cb zone_lexer: use match capture instead of unwrap_or.
  • 147eac6 Use a match to check against strings
  • 6751366 Suggestion: only-one return
  • 207342d Suggestion: use if-expr
  • 2acd4ca Suggestion: one-return + Ok outside.

📊 Changes

1 file changed (+18 additions, -25 deletions)

View changed files

📝 crates/client/src/serialize/txt/zone_lex.rs (+18 -25)

📄 Description

32d993f Used @ bindings in match to avoid unwrap_or https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html#-bindings

Tried to make something more direct for reading in 0104201


🔄 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/1756 **Author:** [@darnuria](https://github.com/darnuria) **Created:** 8/7/2022 **Status:** ✅ Merged **Merged:** 8/7/2022 **Merged by:** [@djc](https://github.com/djc) **Base:** `main` ← **Head:** `cleanup-lex` --- ### 📝 Commits (5) - [`3a4d3cb`](https://github.com/hickory-dns/hickory-dns/commit/3a4d3cb9de39a63dffc429384dfbb57794ed5041) zone_lexer: use match capture instead of unwrap_or. - [`147eac6`](https://github.com/hickory-dns/hickory-dns/commit/147eac60925cc864bc6ee55db23bd9be19a38273) Use a match to check against strings - [`6751366`](https://github.com/hickory-dns/hickory-dns/commit/67513665aaaf35d3af522d60df6d568fb25a8df1) Suggestion: only-one return - [`207342d`](https://github.com/hickory-dns/hickory-dns/commit/207342d7d078429465061507dc10dbe245376198) Suggestion: use if-expr - [`2acd4ca`](https://github.com/hickory-dns/hickory-dns/commit/2acd4ca3c76e6fa5510fdf24a808b198e9f14d34) Suggestion: one-return + Ok outside. ### 📊 Changes **1 file changed** (+18 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `crates/client/src/serialize/txt/zone_lex.rs` (+18 -25) </details> ### 📄 Description [32d993f](https://github.com/bluejekyll/trust-dns/pull/1756/commits/32d993f8e866fa8914ed8f2c66eeb7bb998d1c1b) Used @ bindings in match to avoid `unwrap_or` https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html#-bindings Tried to make something more direct for reading in [0104201](https://github.com/bluejekyll/trust-dns/pull/1756/commits/01042017e9e047342c4d2f823904ecfa26e26d5a) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 10:28:22 +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#2575
No description provided.