Skip to content

Add #[inline] to anyhow::Ok helper#437

Merged
dtolnay merged 1 commit intodtolnay:masterfrom
Ibitier:inline-ok-helper
Feb 5, 2026
Merged

Add #[inline] to anyhow::Ok helper#437
dtolnay merged 1 commit intodtolnay:masterfrom
Ibitier:inline-ok-helper

Conversation

@Ibitier
Copy link
Copy Markdown
Contributor

@Ibitier Ibitier commented Feb 5, 2026

The function is a simple generic wrapper that just forwards to Result::Ok.
Marking it #[inline] allows cross-crate inlining/monomorphization so the helper has no call overhead for downstream users.

Copy link
Copy Markdown
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay dtolnay merged commit dff8c43 into dtolnay:master Feb 5, 2026
14 checks passed
@Ibitier Ibitier deleted the inline-ok-helper branch February 7, 2026 09:15
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