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

Add max length check for io-pattern #18

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Add max length check for io-pattern #18

merged 1 commit into from
Mar 20, 2024

Conversation

moCello
Copy link
Member

@moCello moCello commented Mar 20, 2024

Resolves #17

Copy link
Member

@ureeves ureeves left a comment

Choose a reason for hiding this comment

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

Small suggestion for clarity

src/lib.rs Outdated
@@ -220,6 +225,10 @@ mod tests {
Call::Squeeze(4),
];
assert!(validate_io_pattern(&iopattern).is_err());

let iopattern =
vec![Call::Absorb(3), Call::Absorb(2147483648), Call::Squeeze(1)];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
vec![Call::Absorb(3), Call::Absorb(2147483648), Call::Squeeze(1)];
vec![Call::Absorb(3), Call::Absorb(1 << 31), Call::Squeeze(1)];

@moCello moCello requested a review from ureeves March 20, 2024 14:36
@moCello moCello force-pushed the mocello/17_max_len branch from 6d287bf to b438ba2 Compare March 20, 2024 14:37
@moCello moCello merged commit 8f00c7c into main Mar 20, 2024
4 checks passed
@moCello moCello deleted the mocello/17_max_len branch March 20, 2024 14:39
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.

Limit len in absorb and squeeze to 2^31 - 1
2 participants