mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 14:00:51 -05:00
Switch PyFormatter lifetimes (#4804)
Stylistic change to have the input lifetime first and the output lifetime second. I'll rebase my other PR on top of this. Test plan: `cargo clippy`
This commit is contained in:
@@ -31,7 +31,8 @@ mod trivia;
|
||||
|
||||
include!("../../ruff_formatter/shared_traits.rs");
|
||||
|
||||
pub(crate) type PyFormatter<'buf, 'ast> = Formatter<'buf, PyFormatContext<'ast>>;
|
||||
/// 'ast is the lifetime of the source code (input), 'buf is the lifetime of the buffer (output)
|
||||
pub(crate) type PyFormatter<'ast, 'buf> = Formatter<'buf, PyFormatContext<'ast>>;
|
||||
|
||||
/// Rule for formatting a JavaScript [`AstNode`].
|
||||
pub(crate) trait FormatNodeRule<N>
|
||||
|
||||
Reference in New Issue
Block a user