mirror of https://github.com/astral-sh/ruff
Replace `inline(always)` with `inline` (#6590)
This commit is contained in:
parent
232b44a8ca
commit
455db84a59
|
|
@ -33,8 +33,7 @@ impl<'fmt, Context> Argument<'fmt, Context> {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new<F: Format<Context>>(value: &'fmt F) -> Self {
|
pub fn new<F: Format<Context>>(value: &'fmt F) -> Self {
|
||||||
#[allow(clippy::inline_always)]
|
#[inline]
|
||||||
#[inline(always)]
|
|
||||||
fn formatter<F: Format<Context>, Context>(
|
fn formatter<F: Format<Context>, Context>(
|
||||||
ptr: *const c_void,
|
ptr: *const c_void,
|
||||||
fmt: &mut Formatter<Context>,
|
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.
|
/// Formats the value stored by this argument using the given formatter.
|
||||||
#[allow(clippy::inline_always)]
|
#[inline]
|
||||||
#[inline(always)]
|
|
||||||
pub(super) fn format(&self, f: &mut Formatter<Context>) -> FormatResult<()> {
|
pub(super) fn format(&self, f: &mut Formatter<Context>) -> FormatResult<()> {
|
||||||
(self.formatter)(self.value, f)
|
(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>]);
|
pub struct Arguments<'fmt, Context>(pub &'fmt [Argument<'fmt, Context>]);
|
||||||
|
|
||||||
impl<'fmt, Context> Arguments<'fmt, Context> {
|
impl<'fmt, Context> Arguments<'fmt, Context> {
|
||||||
#[allow(clippy::inline_always)]
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[inline(always)]
|
#[inline]
|
||||||
pub fn new(arguments: &'fmt [Argument<'fmt, Context>]) -> Self {
|
pub fn new(arguments: &'fmt [Argument<'fmt, Context>]) -> Self {
|
||||||
Self(arguments)
|
Self(arguments)
|
||||||
}
|
}
|
||||||
|
|
@ -106,8 +103,7 @@ impl<Context> Clone for Arguments<'_, Context> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Context> Format<Context> for Arguments<'_, Context> {
|
impl<Context> Format<Context> for Arguments<'_, Context> {
|
||||||
#[allow(clippy::inline_always)]
|
#[inline]
|
||||||
#[inline(always)]
|
|
||||||
fn fmt(&self, formatter: &mut Formatter<Context>) -> FormatResult<()> {
|
fn fmt(&self, formatter: &mut Formatter<Context>) -> FormatResult<()> {
|
||||||
formatter.write_fmt(*self)
|
formatter.write_fmt(*self)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@ use crate::{
|
||||||
|
|
||||||
/// Visitor that traverses all nodes recursively in pre-order.
|
/// Visitor that traverses all nodes recursively in pre-order.
|
||||||
pub trait PreorderVisitor<'a> {
|
pub trait PreorderVisitor<'a> {
|
||||||
#[allow(clippy::inline_always)]
|
#[inline]
|
||||||
#[inline(always)]
|
|
||||||
fn enter_node(&mut self, _node: AnyNodeRef<'a>) -> TraversalSignal {
|
fn enter_node(&mut self, _node: AnyNodeRef<'a>) -> TraversalSignal {
|
||||||
TraversalSignal::Traverse
|
TraversalSignal::Traverse
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -442,7 +442,7 @@ impl<'a> Comments<'a> {
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
#[cfg(not(debug_assertions))]
|
#[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.
|
/// Marks the comments of a node printed in verbatim (suppressed) as formatted.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue