Skip to content
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

Handle unicode characters in duval_algorithm #685

Merged
merged 3 commits into from
Mar 16, 2024
Merged

Handle unicode characters in duval_algorithm #685

merged 3 commits into from
Mar 16, 2024

Conversation

realstealthninja
Copy link
Contributor

@realstealthninja realstealthninja commented Mar 16, 2024

Fix duval_algorithm.rs on unicode strings being entered

Description

I've replaced all instances of &[u8] with its character equivalent and replaced the other instances
with appropriate substitutes

Related to #683.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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.

note:
cargo clippy does produce errors but none of them were part of the file I was working on. I'd appreciate it if someone took at look at it

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.70%. Comparing base (10c986d) to head (ca2b348).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #685      +/-   ##
==========================================
- Coverage   94.70%   94.70%   -0.01%     
==========================================
  Files         292      292              
  Lines       23292    23287       -5     
==========================================
- Hits        22058    22053       -5     
  Misses       1234     1234              

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

Copy link
Member

@vil02 vil02 left a comment

Choose a reason for hiding this comment

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

I will push one more commit to reduce code duplication in the tests of duval_algorithm.

@vil02 vil02 changed the title Fix duval_algorithm on unicode strings being entered Handle unicode characters in duval_algorithm Mar 16, 2024
@vil02 vil02 merged commit 2243c0a into TheAlgorithms:master Mar 16, 2024
4 checks passed
@realstealthninja realstealthninja deleted the duval branch March 17, 2024 05:30
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