mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-22 12:35:08 +00: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:
parent
5d939222db
commit
c4fdbf8903
1 changed files with 2 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue