Skip to content

Add missing #[inline] annotations#421

Merged
GuillaumeGomez merged 1 commit intoaskama-rs:masterfrom
Kijewski:pr-inline
Apr 29, 2025
Merged

Add missing #[inline] annotations#421
GuillaumeGomez merged 1 commit intoaskama-rs:masterfrom
Kijewski:pr-inline

Conversation

@Kijewski
Copy link
Copy Markdown
Member

Manually selected from the list of warnings found with #![deny(clippy::missing_inline_in_public_items)]

Comment thread askama/src/values.rs
.and_then(convert_value)
}

fn convert_value<T: Any>(src: &dyn Any) -> Result<&T, Error> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the advantage of creating this function btw?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated byte code of this function is huge, so I would not want to inline it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@GuillaumeGomez
Copy link
Copy Markdown
Collaborator

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 9b41bb9 into askama-rs:master Apr 29, 2025
41 checks passed
@Kijewski Kijewski deleted the pr-inline branch April 29, 2025 17:24
@Kijewski Kijewski mentioned this pull request Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants