-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize away a call to
std::io::stdout()
.
Previously, this code called `std::io::stdout` just to call `as_raw_fd` on it. But calling `std::io::stdout` involves acquiring a lock, and it doesn't fully optimize away. So instead, call `rustix::io::raw_stdout`, which just returns the stdout file descriptor directly, without taking a lock.
- Loading branch information
1 parent
365bbe9
commit a522cfe
Showing
2 changed files
with
3 additions
and
3 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