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

aya-log: s/Result<usize, ()>/Option<NonZeroUsize>/ #735

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

tamird
Copy link
Member

@tamird tamird commented Aug 9, 2023

Option<NonZeroUsize> is guaranteed to have the same size as usize, which
is not guaranteed for Result. This is a minor optimization, but also
results in simpler code.

@netlify
Copy link

netlify bot commented Aug 9, 2023

Deploy Preview for aya-rs-docs ready!

Name Link
🔨 Latest commit ca3f70b
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/64d40007abc02d0008a10a1e
😎 Deploy Preview https://deploy-preview-735--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mergify mergify bot added the aya-log Relating to aya-log label Aug 9, 2023
@mergify mergify bot added the test A PR that improves test cases or CI label Aug 9, 2023
Copy link
Member

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

LGTM

`Option<NonZeroUsize>` is guaranteed to have the same size as `usize`,
which is not guarnateed for `Result`. This is a minor optimization, but
also results in simpler code.
@tamird tamird merged commit ecf0dd9 into main Aug 10, 2023
21 checks passed
@tamird tamird deleted the log-option-not-result branch August 10, 2023 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aya-log Relating to aya-log test A PR that improves test cases or CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants