Skip to content

Commit

Permalink
Merge pull request #3 from dtolnay/inline
Browse files Browse the repository at this point in the history
Forcibly inline vtable access
  • Loading branch information
dtolnay authored Aug 17, 2024
2 parents a94b336 + c0e9920 commit fcc8b8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
#![no_std]
#![doc(html_root_url = "https://docs.rs/typeid/1.0.1")]
#![allow(clippy::doc_markdown)]
#![allow(clippy::doc_markdown, clippy::inline_always)]

extern crate self as typeid;

Expand Down Expand Up @@ -194,6 +194,7 @@ impl Hash for ConstTypeId {
}

#[must_use]
#[inline(always)]
pub fn of<T>() -> TypeId
where
T: ?Sized,
Expand All @@ -205,6 +206,7 @@ where
}

impl<T: ?Sized> NonStaticAny for PhantomData<T> {
#[inline(always)]
fn get_type_id(&self) -> TypeId
where
Self: 'static,
Expand Down

0 comments on commit fcc8b8f

Please sign in to comment.