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

More validation #180

Merged
merged 5 commits into from
Nov 8, 2024
Merged

More validation #180

merged 5 commits into from
Nov 8, 2024

Conversation

dalonsoa
Copy link
Collaborator

@dalonsoa dalonsoa commented Nov 7, 2024

Description

Adds more validation to the process parameters. In addition to what's described in #163, if also validates the lifetime since, presumably, it should be a number greater than zero, and not just positive.

Fixes #163

Type of change

  • Bug fix (non-breaking change to fix an issue)
  • New feature (non-breaking change to add functionality)
  • Refactoring (non-breaking, non-functional change to improve maintainability)
  • Optimization (non-breaking change to speed up the code)
  • Breaking change (whatever its nature)
  • Documentation (improve or add documentation)

Key checklist

  • All tests pass: $ cargo test
  • The documentation builds and looks OK: $ cargo doc

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.69%. Comparing base (460597b) to head (4cf2628).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/process.rs 76.92% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #180      +/-   ##
==========================================
- Coverage   84.96%   84.69%   -0.27%     
==========================================
  Files          12       12              
  Lines         379      392      +13     
==========================================
+ Hits          322      332      +10     
- Misses         57       60       +3     

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

Copy link
Collaborator

@alexdewar alexdewar left a comment

Choose a reason for hiding this comment

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

All good, except for some minor stylistic things.

src/process.rs Outdated Show resolved Hide resolved
src/process.rs Outdated Show resolved Hide resolved
src/process.rs Outdated Show resolved Hide resolved
src/process.rs Outdated Show resolved Hide resolved
dalonsoa and others added 2 commits November 7, 2024 11:14
Co-authored-by: Alex Dewar <alexdewar@users.noreply.github.com>
@dalonsoa dalonsoa requested a review from alexdewar November 7, 2024 11:21
@dalonsoa
Copy link
Collaborator Author

dalonsoa commented Nov 7, 2024

Done! I've not used anyhow as it would require to change the function signatures, which will propagate upwards several levels. So let's make that change in isolation after this is merged.

Copy link
Collaborator

@tsmbland tsmbland left a comment

Choose a reason for hiding this comment

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

All looks good to me

Copy link
Collaborator

@alexdewar alexdewar left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks 😄

@dalonsoa dalonsoa merged commit 4e88827 into main Nov 8, 2024
7 checks passed
@dalonsoa dalonsoa deleted the more_validation branch November 8, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add more validation for process parameters
3 participants