Skip to content

style: cleanup run_length_encoding.rs #744

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 3 commits into from
Jun 12, 2024

Conversation

vil02
Copy link
Member

@vil02 vil02 commented Jun 11, 2024

Pull Request Template

Description

This PR cleanups the run_length_encoding.rs:

  • the string_to_string is removed from the suppression list - continuation of style: make clippy more strict #743,
  • the tests are rewritten using a macro,
  • the way how these functions react to empty input was changed.

Checklist:

  • I ran bellow commands using the latest version of rust nightly.
  • I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • I ran cargo fmt just before my last commit.
  • I ran cargo test just before my last commit and all tests passed.
  • I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • I added my algorithm to DIRECTORY.md with the correct link.
  • I checked COUNTRIBUTING.md and my code follows its guidelines.

Please make sure that if there is a test that takes too long to run ( > 300ms), you #[ignore] that or
try to optimize your code or make the test easier to run. We have this rule because we have hundreds of
tests to run; If each one of them took 300ms, we would have to wait for a long time.

@vil02 vil02 changed the title Include string to string style: cleanup run_length_encoding.rs Jun 11, 2024
@vil02 vil02 requested a review from siriak June 11, 2024 20:29
@vil02 vil02 marked this pull request as ready for review June 11, 2024 20:29
@vil02 vil02 requested a review from imp2002 as a code owner June 11, 2024 20:29
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.01%. Comparing base (2544d28) to head (32895ca).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #744      +/-   ##
==========================================
- Coverage   95.02%   95.01%   -0.01%     
==========================================
  Files         303      303              
  Lines       22563    22526      -37     
==========================================
- Hits        21440    21403      -37     
  Misses       1123     1123              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vil02 vil02 merged commit ade43ce into TheAlgorithms:master Jun 12, 2024
4 of 8 checks passed
@vil02 vil02 deleted the include_string_to_string branch June 12, 2024 06:08
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.

3 participants