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

Completed task 082 #20

Merged
merged 3 commits into from
Sep 28, 2024
Merged

Completed task 082 #20

merged 3 commits into from
Sep 28, 2024

Conversation

MRHMisu
Copy link
Contributor

@MRHMisu MRHMisu commented Sep 27, 2024

Completed task 082, source formatted with verusfmt

// This function determines if a given string length is prime or not
fn prime_length(str: &[char]) -> (result: bool)
ensures
result == if str.len() < 2 {
Copy link
Contributor

Choose a reason for hiding this comment

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

To add a bit of additional clarity, could you factor this into an is_prime spec function, so the postcondition would simply be result == is_prime(str.len())?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback.

Copy link
Contributor

@parno parno left a comment

Choose a reason for hiding this comment

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

Looks good!

@parno parno merged commit 8db9b06 into secure-foundations:main Sep 28, 2024
1 check 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.

2 participants