Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix sentence error in exercise "Animal sanctuary registry"#177

Open
Mapaor wants to merge 7 commits into
rustfinity:mainrustfinity/rustfinity:mainfrom
Mapaor:mainMapaor/rustfinity:mainCopy head branch name to clipboard
Open

Fix sentence error in exercise "Animal sanctuary registry"#177
Mapaor wants to merge 7 commits into
rustfinity:mainrustfinity/rustfinity:mainfrom
Mapaor:mainMapaor/rustfinity:mainCopy head branch name to clipboard

Conversation

@Mapaor
Copy link
Copy Markdown

@Mapaor Mapaor commented Mar 29, 2026

Original paragraph:

Hashmaps are a powerful data structure that allow you to store key-value pairs. In Rust, the HashMap type is provided that uses the a hashing algorithm called SipHash to store keys and values in a way that allows for fast and secure lookups. Think of them as a dictionary in Python or an object in JavaScript.

There is a sentence which contains a typo:

...uses THE A hashing algorithm called...

And also a grammatical error:

the HashMap type is provided THAT uses...

First commit fixes both errors (replacing 'that' with 'which' and choosing the indefinite article 'a' and removing the definite one). Producing:

(...) In Rust, the HashMap type is provided, which uses a hashing algorithm called SipHash (...)

The second commit slightly rephrases the sentence to avoid using the passive "is provided":

(...) In Rust, the HashMap type is implemented using a hashing algorithm called SipHash (...)

Which in my opinion is clearer (because we already know from the previous exercise that the HashMap type is provided in Rust so maybe there's no need to use the word "provided" here).

The third commit kinda rephrases the whole paragraph to make it more clear and also more technically accurate (but I could be wrong as I am not a Rust expert which is why I am on Rustfinity):

Hashmaps are a powerful data structure that allow you to store key-value pairs. In Rust, the HashMap type uses a hashing algorithm to store keys and values, allowing for fast lookups. By default, Rust uses SipHash, a hashing algorithm that protects against hashing collision attacks and potentially malicious inputs. Conceptually, you can think of a HashMap like a dictionary in Python or an object in JavaScript.

The fourth commit simply explicitly says that the default hashing algorithm used in Rust (unlike in most other programming languages) is designed to be secure and not only fast. It is already obvious but saying it explicitly maybe makes it easier for beginners to get familiar with Rust design philosophy.

(...) that protects against (...), making lookups both fast and secure.

The fifth commit is about making it clearer for beginners (that may not familiar with hash maps) that the way in which the keys and values are internally stored is important.

Hashmaps are a powerful data structure that allow you to store key-value pairs. Internally the HashMap type uses a hashing algorithm to store the keys and values in a specific, organized way, which allows fast lookups.

The other 2 commits are minor grammatical improvements.

The FINAL proposed version is:

Hash maps are a powerful data structure that allow you to store key-value pairs. Internally the HashMap type uses a hashing algorithm to store keys and values in a specific, organized way, which allows fast lookups. By default, Rust uses SipHash, an algorithm that protects against hash collision attacks and potentially malicious inputs, making lookups not only fast but also secure. Conceptually, you can think of a HashMap like a dictionary in Python or an object in JavaScript.

Mapaor added 2 commits March 29, 2026 22:52
The original phrasing was maybe not the clearest one.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 29, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The pull request updates the Rust challenge description at challenges/animal-sanctuary-registry/description.md. It rephrases the HashMap explanation: it removes the claim that HashMap "uses" SipHash and replaces it with a general statement that HashMap uses a hashing algorithm and that Rust defaults to SipHash, noting its role against hash-collision attacks and malicious inputs. No other challenge text, tasks, examples, hints, or exported entities were changed. The change is one line added and one line removed.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately describes the main change: fixing sentence errors (typo and grammatical issues) in the Animal Sanctuary Registry exercise description.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description directly addresses the changes made to the challenge description, providing detailed context about typo fixes, grammatical corrections, and iterative improvements to the HashMap explanation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
challenges/animal-sanctuary-registry/description.md (1)

3-3: Refine the HashMap/SipHash statement for technical precision.

The phrase "implemented using … SipHash" is slightly imprecise. SipHash is the default hashing algorithm, not the implementation itself. Since Rust documentation notes this is subject to change, reflect that as well.

Suggested wording
-Hashmaps are a powerful data structure that allow you to store **key-value pairs**. In Rust, the `HashMap` type is implemented using a **hashing algorithm** called **SipHash** to store keys and values in a way that allows for **fast and secure** lookups. Think of them as a dictionary in Python or an object in JavaScript.
+Hashmaps are a powerful data structure that allow you to store **key-value pairs**. In Rust, `HashMap` uses **SipHash** as its default **hashing algorithm** for fast and secure lookups (this default may change). Think of them as a dictionary in Python or an object in JavaScript.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@challenges/animal-sanctuary-registry/description.md` at line 3, Edit the
description text around "HashMap" and "SipHash" to clarify that Rust's HashMap
uses a hashing algorithm and that SipHash is the default hasher (not the
implementation), and note the default is subject to change; specifically update
the sentence referencing `HashMap` and `SipHash` so it reads that HashMap relies
on a hashing algorithm (by default SipHash) for secure lookups and that the
choice of default hasher may change in future Rust versions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@challenges/animal-sanctuary-registry/description.md`:
- Line 3: Edit the description text around "HashMap" and "SipHash" to clarify
that Rust's HashMap uses a hashing algorithm and that SipHash is the default
hasher (not the implementation), and note the default is subject to change;
specifically update the sentence referencing `HashMap` and `SipHash` so it reads
that HashMap relies on a hashing algorithm (by default SipHash) for secure
lookups and that the choice of default hasher may change in future Rust
versions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 88f1e877-708e-4ff3-933a-45e1f0515dcf

📥 Commits

Reviewing files that changed from the base of the PR and between e13684e and a469407.

📒 Files selected for processing (1)
  • challenges/animal-sanctuary-registry/description.md

Mapaor added 5 commits March 29, 2026 23:48
Clarified the explanation of Rust's HashMap and its default hashing algorithm
Enhanced the description of Hashmaps in Rust by making the "secure" part of lookups more explicit.
Rephrased the paragraph again make it more beginner friendly and clearer to read.
Removed redundant wording in the description of hash maps.
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.