-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
#[inline]
attribute to a few more methods (#334, #317)
To be clear, the `#[inline]` does not hint that inlining is beneficial, but it does give the compiler the option to inline if the compiler things it would be beneficial. This starts adding the `#[inline]` attribute to: 1. `IsVariant`: it's expected that this is often beneficial, since its body is tiny. 2. `Debug`: This is to stay in line with the `std` implementation of the `Debug` derive. rust-lang/rust#117727 It also explicitly doesn't add the attribute to the methods of `Error`, since those are almost never called in hot code paths.
- Loading branch information
Showing
4 changed files
with
8 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters