Fix sentence error in exercise "Animal sanctuary registry"#177
Fix sentence error in exercise "Animal sanctuary registry"#177Mapaor wants to merge 7 commits into
Conversation
The original phrasing was maybe not the clearest one.
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe pull request updates the Rust challenge description at 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 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
📒 Files selected for processing (1)
challenges/animal-sanctuary-registry/description.md
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.
Original paragraph:
There is a sentence which contains a typo:
And also a grammatical error:
First commit fixes both errors (replacing 'that' with 'which' and choosing the indefinite article 'a' and removing the definite one). Producing:
The second commit slightly rephrases the sentence to avoid using the passive "is provided":
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):
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.
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.
The other 2 commits are minor grammatical improvements.
The FINAL proposed version is: