mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 10:22:24 +00:00
Replace inline(always)
with inline
(#6590)
This commit is contained in:
parent
232b44a8ca
commit
455db84a59
3 changed files with 6 additions and 11 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue