-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add clippy.toml to disallow methods (#204)
* add clippy.toml to disallow methods * remove use of mem::zeroed in xcoder, where possible * remove unbounded channels in macos/video-toolbox * remove use of zeroed in xcoder-logan * remove use of zeroed in srt crate * bump ffmpeg test bound up even higher to reduce test flakiness * Change compression session to use smaller channel and never block * Change decompression session to use a mutex instead of a channel * video-toolbox: restructure error to better handle when the inner channel is dropped * Document channel drop behavior for fn frames
- Loading branch information
Showing
14 changed files
with
182 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
disallowed-methods = [ | ||
# These functions are very easy to misuse, please use `MaybeUninit` instead. | ||
"std::mem::zeroed", | ||
"std::mem::uninitialized", | ||
# Unbounded memory growth is not approved for use. Use a bounded channel buffer. | ||
"std::sync::mpsc::channel", | ||
"tokio::sync::mpsc::unbounded_channel", | ||
"crossbeam_channel::unbounded", | ||
# These methods poll futures in a biased manner without containing the word "biased" in their name. | ||
# This is a footgun and can result in the system starving itself out during high load scenarios. | ||
# See https://github.com/rust-lang/futures-rs/issues/2135 for more. | ||
"futures::future::select", | ||
"futures_util::future::select", | ||
"futures::future::try_select", | ||
"futures_util::future::try_select", | ||
"futures::future::select_ok", | ||
"futures_util::future::select_ok", | ||
] |
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
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
Oops, something went wrong.