-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid using #[cfg] on multiple individual function arguments
Attaching #[cfg] to individual arguments makes it look like the function has five conditionally present arguments, and doesn't make it immediately apparent that the first two are for the first argument and the last three are for the second argument. Split them into separate `let` statements for clarity. In the process, factor out the common `.try_into().ok()?` from each.
- Loading branch information
1 parent
1ba9488
commit 6fc27ee
Showing
1 changed file
with
28 additions
and
20 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