mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:43 +00:00
Remove lifetime from FormatContext (#4376)
This commit is contained in:
parent
6a52577630
commit
1ccef5150d
21 changed files with 124 additions and 138 deletions
|
@ -12,7 +12,7 @@ pub struct FormatExcepthandler<'a> {
|
|||
item: &'a Excepthandler,
|
||||
}
|
||||
|
||||
impl AsFormat<ASTFormatContext<'_>> for Excepthandler {
|
||||
impl AsFormat<ASTFormatContext> for Excepthandler {
|
||||
type Format<'a> = FormatExcepthandler<'a>;
|
||||
|
||||
fn format(&self) -> Self::Format<'_> {
|
||||
|
@ -20,7 +20,7 @@ impl AsFormat<ASTFormatContext<'_>> for Excepthandler {
|
|||
}
|
||||
}
|
||||
|
||||
impl Format<ASTFormatContext<'_>> for FormatExcepthandler<'_> {
|
||||
impl Format<ASTFormatContext> for FormatExcepthandler<'_> {
|
||||
fn fmt(&self, f: &mut Formatter<ASTFormatContext>) -> FormatResult<()> {
|
||||
let excepthandler = self.item;
|
||||
let ExcepthandlerKind::ExceptHandler { type_, name, body } = &excepthandler.node;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue