Remove lifetime from FormatContext (#4376)

This commit is contained in:
Micha Reiser 2023-05-11 17:43:42 +02:00 committed by GitHub
parent 6a52577630
commit 1ccef5150d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 124 additions and 138 deletions

View file

@ -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;