Skip to content

Exposed the as_ptr api, better inlining#34

Open
adamnemecek wants to merge 2 commits into
Amanieu:masterfrom
adamnemecek:master
Open

Exposed the as_ptr api, better inlining#34
adamnemecek wants to merge 2 commits into
Amanieu:masterfrom
adamnemecek:master

Conversation

@adamnemecek

Copy link
Copy Markdown

Exposed the as_ptr API to match atomic. It's called as_ptr in line with this.

@Amanieu

Amanieu commented Mar 5, 2023

Copy link
Copy Markdown
Owner

#[inline(always)] is actively harmful in debug builds since it forces inlining when it is of no benefit. Just plain #[inline] is sufficient.

Comment thread src/lib.rs
fn inner_ptr(&self) -> *mut T {
/// Returns a mutable pointer to the underlying type.
///

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Remove the empty lines.

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