Skip to content

Commit

Permalink
set inline(always) for noop
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaninja committed Sep 21, 2023
1 parent ec59065 commit 910d48f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub fn noop_arity(input: TokenStream) -> TokenStream {

let expanded = quote! {
#[doc = #msg]
#[inline]
#[inline(always)]
pub fn #fn_name< #( #type_args ),* >( #( #fn_args ),*) {}
};

Expand Down
2 changes: 1 addition & 1 deletion src/and_then.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! AndThen.

use std::marker::PhantomData;
use core::marker::PhantomData;

use crate::higher::Higher;

Expand Down
4 changes: 2 additions & 2 deletions src/combinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ tuple_arity!(12);
///
/// noop();
/// ```
#[inline]
#[inline(always)]
pub const fn noop() {}

/// The no operation function of 1 argument.
Expand All @@ -240,7 +240,7 @@ pub const fn noop() {}
/// let actual = Some(1).map(noop1);
/// assert_eq!(Some(()), actual);
/// ```
#[inline]
#[inline(always)]
pub fn noop1<T>(_: T) {}

noop_arity!(2);
Expand Down

0 comments on commit 910d48f

Please sign in to comment.