Skip to content

Commit

Permalink
Remove some #[inline(always)]
Browse files Browse the repository at this point in the history
  • Loading branch information
frengor committed Jul 29, 2024
1 parent c8af305 commit f7e8290
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/cc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ impl<T: Trace> Cc<T> {
/// # Panics
///
/// Panics if the automatically-stared collection panics.
#[inline(always)]
#[must_use = "newly created Cc is immediately dropped"]
#[track_caller]
pub fn new(t: T) -> Cc<T> {
Expand Down Expand Up @@ -353,7 +352,6 @@ pub(crate) struct CcBox<T: ?Sized + Trace + 'static> {
}

impl<T: Trace> CcBox<T> {
#[inline(always)]
#[must_use]
fn new(t: T, state: &State) -> NonNull<CcBox<T>> {
let layout = Layout::new::<CcBox<T>>();
Expand All @@ -380,7 +378,6 @@ impl<T: Trace> CcBox<T> {
}
}

#[inline(always)]
#[cfg(all(test, feature = "std"))] // Only used in unit tests
#[must_use]
pub(crate) fn new_for_tests(t: T) -> NonNull<CcBox<T>> {
Expand Down Expand Up @@ -853,7 +850,7 @@ impl<T: Trace> From<T> for Cc<T> {
/// This method may start a collection when the `auto-collect` feature is enabled.
///
/// See the [`config` module documentation][`mod@crate::config`] for more details.
#[inline(always)]
#[inline]
fn from(value: T) -> Self {
Cc::new(value)
}
Expand Down
2 changes: 1 addition & 1 deletion src/weak/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<T: ?Sized + Trace> Weak<T> {
self.weak_counter_marker().map_or(0, |wcm| wcm.counter() as u32)
}

#[inline(always)]
#[inline]
fn weak_counter_marker(&self) -> Option<&WeakCounterMarker> {
Some(unsafe { &self.metadata?.as_ref().weak_counter_marker })
}
Expand Down

0 comments on commit f7e8290

Please sign in to comment.