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

Improve infix to postfix notation algorithm #772

Merged
merged 11 commits into from
Aug 4, 2024

Conversation

bgdnrvsky
Copy link
Contributor

Description

  • Moved the algorithm to a more appropriate place
  • Introduced the error handling for the algorithm
  • Added erroneous unit tests

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

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.

I think that infix to postfix notation algorithm belongs to conversions,
and certainly not to data structures
No need for the closure to return `i32`, since not only it is never
negative, but also it will never be as huge to make it a 32 bit
@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 97.72727% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.08%. Comparing base (b8fa915) to head (c61e3af).

Files Patch % Lines
src/math/infix_to_postfix.rs 97.72% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #772      +/-   ##
==========================================
+ Coverage   95.06%   95.08%   +0.01%     
==========================================
  Files         309      309              
  Lines       22792    22789       -3     
==========================================
  Hits        21668    21668              
+ Misses       1124     1121       -3     

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

src/conversions/infix_to_postfix.rs Outdated Show resolved Hide resolved
src/conversions/infix_to_postfix.rs Outdated Show resolved Hide resolved
src/conversions/infix_to_postfix.rs Outdated Show resolved Hide resolved
@vil02
Copy link
Member

vil02 commented Aug 4, 2024

There was an update of clippy and some warnings become active. Could you just suppress them in Cargo.toml? Done in c61e3af.

@vil02 vil02 merged commit faa626c into TheAlgorithms:master Aug 4, 2024
4 checks passed
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