Replace inline(always) with inline (#6590)

This commit is contained in:
Micha Reiser 2023-08-15 08:58:11 +02:00 committed by GitHub
parent 232b44a8ca
commit 455db84a59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 11 deletions

View file

@ -33,8 +33,7 @@ impl<'fmt, Context> Argument<'fmt, Context> {
#[doc(hidden)]
#[inline]
pub fn new<F: Format<Context>>(value: &'fmt F) -> Self {
#[allow(clippy::inline_always)]
#[inline(always)]
#[inline]
fn formatter<F: Format<Context>, Context>(
ptr: *const c_void,
fmt: &mut Formatter<Context>,
@ -52,8 +51,7 @@ impl<'fmt, Context> Argument<'fmt, Context> {
}
/// Formats the value stored by this argument using the given formatter.
#[allow(clippy::inline_always)]
#[inline(always)]
#[inline]
pub(super) fn format(&self, f: &mut Formatter<Context>) -> FormatResult<()> {
(self.formatter)(self.value, f)
}
@ -82,9 +80,8 @@ impl<'fmt, Context> Argument<'fmt, Context> {
pub struct Arguments<'fmt, Context>(pub &'fmt [Argument<'fmt, Context>]);
impl<'fmt, Context> Arguments<'fmt, Context> {
#[allow(clippy::inline_always)]
#[doc(hidden)]
#[inline(always)]
#[inline]
pub fn new(arguments: &'fmt [Argument<'fmt, Context>]) -> Self {
Self(arguments)
}
@ -106,8 +103,7 @@ impl<Context> Clone for Arguments<'_, Context> {
}
impl<Context> Format<Context> for Arguments<'_, Context> {
#[allow(clippy::inline_always)]
#[inline(always)]
#[inline]
fn fmt(&self, formatter: &mut Formatter<Context>) -> FormatResult<()> {
formatter.write_fmt(*self)
}

View file

@ -7,8 +7,7 @@ use crate::{
/// Visitor that traverses all nodes recursively in pre-order.
pub trait PreorderVisitor<'a> {
#[allow(clippy::inline_always)]
#[inline(always)]
#[inline]
fn enter_node(&mut self, _node: AnyNodeRef<'a>) -> TraversalSignal {
TraversalSignal::Traverse
}

View file

@ -442,7 +442,7 @@ impl<'a> Comments<'a> {
#[inline(always)]
#[cfg(not(debug_assertions))]
pub(crate) fn mark_verbatim_node_comments_formatted(&self, node: AnyNodeRef) {}
pub(crate) fn mark_verbatim_node_comments_formatted(&self, _node: AnyNodeRef) {}
/// Marks the comments of a node printed in verbatim (suppressed) as formatted.
///