Skip to content

feat(sys): impl Hash for ngx_str_t #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

bavshin-f5
Copy link
Member

Style fixes.

@bavshin-f5 bavshin-f5 requested review from ensh63 and Copilot July 9, 2025 16:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements Hash for ngx_str_t and applies style cleanups.

  • Adds fmt::Display and hash::Hash trait implementations for ngx_str_t.
  • Updates imports to use core::cmp, core::hash, and core::str, and simplifies namespace references.
  • Removes duplicate Display impl and updates the TryFrom error alias to str::Utf8Error.
Comments suppressed due to low confidence (3)

nginx-sys/src/string.rs:116

  • Public trait implementation is missing documentation; consider adding /// comments explaining how Display should format ngx_str_t.
impl fmt::Display for ngx_str_t {

nginx-sys/src/string.rs:132

  • The new Hash implementation lacks doc comments; consider adding /// documentation to explain its behavior and guarantee for ngx_str_t.
impl hash::Hash for ngx_str_t {

nginx-sys/src/string.rs:132

  • There are no unit tests for the new Hash implementation; consider adding tests to verify consistent hashing for identical and different ngx_str_t values.
impl hash::Hash for ngx_str_t {

@bavshin-f5 bavshin-f5 merged commit 6e156b7 into nginx:master Jul 9, 2025
15 checks passed
@bavshin-f5 bavshin-f5 deleted the string-hash branch July 9, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants