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

queue: check queue size at compile time #134

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

00xc
Copy link
Contributor

@00xc 00xc commented May 14, 2024

Emit a compile-time error if a queue size is invalid, instead of a runtime error. This allows catching mistakes earlier, since the queue size is always defined at compile time.

Unfortunately this means we must remove the corresponding test, as the only way to test a compile-time failure (without using external crates) is via doctests, which do not have access to private items (which is the case for VirtQueue).

Emit a compile-time error if a queue size is invalid, instead of a
runtime error. This allows catching mistakes earlier, since the queue
size is always defined at compile time.

Unfortunately this means we must remove the corresponding test, as the
only way to test a compile-time failure (without using external
crates) is via doctests, which do not have access to private items
(which is the case for VirtQueue).

Signed-off-by: Carlos López <[email protected]>
@qwandor qwandor merged commit 3a9a69c into rcore-os:master May 14, 2024
5 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.

2 participants