Skip to content

[EXTERNAL] fix(rust-piscine): fix checkpoint subjects#3024

Merged
pedrodesu merged 3 commits into01-edu:masterfrom
sadiqui:patch-27
Sep 2, 2025
Merged

[EXTERNAL] fix(rust-piscine): fix checkpoint subjects#3024
pedrodesu merged 3 commits into01-edu:masterfrom
sadiqui:patch-27

Conversation

@sadiqui
Copy link
Copy Markdown
Contributor

@sadiqui sadiqui commented Aug 11, 2025

1. check_user_name

  • Use Rust underscore style in User field.
  • Explicitly specify enum type AccessLevel.
  • check_user_name takes references to User.
  • Tests expect "ERROR" to be entirely uppercase.

https://github.com/01-edu/rust-tests/blob/a38b2f91f5e3e38920de07d5c6bd8d6cec20623e/tests/check_user_name_test/src/main.rs#L21-L24


2. get_document_id

  • Structures are already offered.
  • Highlight the needed task.

3. previous_prime

  • Tests don't expect prime argument to be returned.

https://github.com/01-edu/rust-tests/blob/a38b2f91f5e3e38920de07d5c6bd8d6cec20623e/tests/previousprime_test/src/main.rs#L15-L19

@pedrodesu
Copy link
Copy Markdown
Contributor

Hello @sadiqui! Thank you for the extensive PR. I'd like to address all the changes you requested:

  • The first and third ammends on check_user_name totally make sense. They should be changed. The second one isn't much of a necessity, as the 'expected functions and structures' section already states we're borrowing the reference, not moving. Nevertheless, this change can stay to remove ambiguity.
  • The change on previousprime was nullified, as the problem was already identified and fixed in a newer version of the repo.
  • The change on get_document_id doesn't seem necessary either, it's a bit of a matter of interpretation. You're still manually creating the structures/functions/what not, the 'expected' section ideally serves more as a hard verification for the student to ensure they have the minimal structure that the exercise asks for, and that they have the needed technicalities to pass the subject (for example, whether we're passing an instance of a method by value or reference). This isn't a big deal at all, it's just a clarification for the future. As such I'll return this line to its original state. All the remaining changes will stay and be merged, however.

Thank you sir. Please let me know if you'd like to comment on something else.

@pedrodesu pedrodesu merged commit 00b9342 into 01-edu:master Sep 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗂️ docs Documentation 📕 Rust Rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants